locked
CurrentAppSimulator.ReloadSimulatorAsync Error when loading XML file

    Question

  • I am trying to incorporate a few in app purchases. I have added them into my app on the Dev Center, and created an xml file as below this ticket. However, when I execute the following, on the bold line ( await CurrentAppSimulator.ReloadSimulatorAsync(proxyFile);) I get the error: The input data was not in the expected format or did not have the expected value. (Exception from HRESULT: 0x803D0000)

                    StorageFolder proxyDataFolder =
                        await
                            Package.Current.InstalledLocation.GetFolderAsync("Assets")
                                .AsTask()
                                .ConfigureAwait(false);
                    StorageFile proxyFile =
                        await
                            proxyDataFolder.GetFileAsync("myfile.xml")
                                .AsTask()
                                .ConfigureAwait(false);
    #if DEBUG
                    await CurrentAppSimulator.ReloadSimulatorAsync(proxyFile);
                    ListingInformation listing =
                        await CurrentAppSimulator.LoadListingInformationAsync().AsTask().ConfigureAwait(false);
    #else
                    await CurrentApp.ReloadSimulatorAsync(proxyFile);
                    ListingInformation listing =
                        await CurrentApp.LoadListingInformationAsync().AsTask().ConfigureAwait(false);
    #endif

    and my XML file.

    <?xml version="1.0" encoding="utf-16" ?>
    <CurrentApp>
      <ListingInformation>
        <App>
          <AppId>00000000-0000-0000-0000-000000000000</AppId>
          <LinkUri>http://apps.microsoft.com/webpdp/app/00000000-0000-0000-0000-000000000000</LinkUri>
          <CurrentMarket>en-gb</CurrentMarket>
          <AgeRating>12</AgeRating>
          <MarketData xml:lang="en-gb">
            <Name>My App Name</Name>
            <Description>Keep track of all your meeting costs</Description>
            <Price>0.00</Price>
            <CurrencySymbol>£</CurrencySymbol>
            <CurrencyCode>GBP</CurrencyCode>
          </MarketData>
        </App>
        <Product ProductId="TenCredits" ProductType="Consumable" Status="Active">
          <MarketData xml:lang="en-gb">
            <Name>10 Credits</Name>
            <Price>0.79</Price>
            <CurrencySymbol>£</CurrencySymbol>
            <CurrencyCode>GBP</CurrencyCode>
          </MarketData>
        </Product>
        <Product ProductId="TwentyCredits" ProductType="Consumable" Status="Active">
          <MarketData xml:lang="en-gb">
            <Name>20 Credits</Name>
            <Price>1.49</Price>
            <CurrencySymbol>£</CurrencySymbol>
            <CurrencyCode>GBP</CurrencyCode>
          </MarketData>
        </Product>
        <Product ProductId="FiftyCredits" ProductType="Consumable" Status="Active">
          <MarketData xml:lang="en-gb">
            <Name>50 Credits</Name>
            <Price>3.49</Price>
            <CurrencySymbol>£</CurrencySymbol>
            <CurrencyCode>GBP</CurrencyCode>
          </MarketData>
        </Product>
        <Product ProductId="OneHundredCredits" ProductType="Consumable" Status="Active">
          <MarketData xml:lang="en-gb">
            <Name>100 Credits</Name>
            <Price>6.99</Price>
            <CurrencySymbol>£</CurrencySymbol>
            <CurrencyCode>GBP</CurrencyCode>
          </MarketData>
        </Product>
      </ListingInformation>
      <LicenseInformation>
        <App>
          <IsActive>true</IsActive>
          <IsTrial>false</IsTrial>
        </App>
      </LicenseInformation>
    </CurrentApp>

    Thursday, March 12, 2015 2:01 PM

Answers