我正在尝试使用CurrentAppSimulator
对我的应用进行一些测试,但它无法正常工作。我在Assets目录中创建了WindowsStoreProxy.xml
,并将build设置为None,并将Copy to Copy Directory设置为Always。
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>