在Windows应用商店中模拟购买

时间:2014-02-24 16:52:47

标签: c# windows in-app-purchase windows-store-apps windows-store

我在Windows应用商店应用内购买时遇到了一个奇怪的问题。 当我将应用程序上传到商店时,我会看到如下弹出式窗口: enter image description here

但是当我在本地计算机上运行时,从发布模式运行并使用CurrentApp 一切似乎都没问题,我看到在商店检查价格: enter image description here 另外有趣的是,当我使用CurrentAppCurrentAppSimulator时没有区别。 请告诉我我做错了什么?

检查代码众所周知:

public async Task<bool> IsPurchased(string featureName)
    {
        var applicationInformation = CurrentApp.LicenseInformation;

        if (applicationInformation.ProductLicenses[featureName].IsActive)
        {
            return true;
        }
        else
        {
            await CurrentApp.RequestProductPurchaseAsync(featureName);

            return applicationInformation.ProductLicenses[featureName].IsActive;
        }
    }

1 个答案:

答案 0 :(得分:0)

我不得不从bin文件夹中删除所有内容,清理解决方案并重建它。 经过这些操作,一切正常。

相关问题