3

我正在尝试使用 对我的应用程序进行一些测试,CurrentAppSimulator但它不起作用。我WindowsStoreProxy.xml在我的资产目录中创建并将构建设置为无并将复制到输出目录设置为始终。

StorageFolder proxyDataFolder = await Package.Current.InstalledLocation.GetFolderAsync("Assets");
StorageFile proxyFile = await proxyDataFolder.GetFileAsync("WindowsStoreProxy.xml");
await CurrentAppSimulator.ReloadSimulatorAsync(proxyFile);

当我使用以下代码加载代理许可证时,我收到一条错误消息“输入数据不是预期格式或没有预期值”。我尝试更改代理文件,但似乎没有帮助,我尝试使用 MSDN 中的示例文件。

<?xml version="1.0" encoding="UTF-16"?>
<CurrentApp>
  <ListingInformation>
    <App>
      <AppId>9nblggh67n3b</AppId>
      <LinkUri>https://www.microsoft.com/store/apps/9nblggh67n3b</LinkUri>
      <CurrentMarket>en-US</CurrentMarket>
      <AgeRating>3</AgeRating>
      <MarketData xml:lang="en-us">
        <Name>Feline Strike</Name>
        <Description>Sample app for demonstrating trial license management</Description>
        <Price>4.99</Price>
        <CurrencySymbol>$</CurrencySymbol>
      </MarketData>
    </App>
  </ListingInformation>
  <LicenseInformation>
    <App>
      <IsActive>true</IsActive>
      <IsTrial>true</IsTrial>
    </App>
  </LicenseInformation>
  <Simulation SimulationMode="Automatic">
    <DefaultResponse MethodName="LoadListingInformationAsync_GetResult" HResult="E_FAIL"/>
  </Simulation>
</CurrentApp>
4

0 回答 0