【问题标题】:Windows Phone 8 In-App Purchasing errorWindows Phone 8 应用内购买错误
【发布时间】:2014-05-13 05:53:46
【问题描述】:

在为 WP8 实施应用内购买时,我遇到了一个非常奇怪的问题。我从一个标准模板创建了一个 WP8 解决方案,并开始关注the Microsoft guide,它声明了此代码以开始检索产品:

// First, retrieve the list of some products by their IDs.
ListingInformation listings = await CurrentApp.LoadListingInformationByProductIdsAsync(new string[] { "Bag of 50 gold", "Bag of 100 gold" });

这是我在我的测试解决方案中使用它的方式:

IEnumerable<string> productIDs = new List<string>() {"Bag of 50 gold", "Bag of 100 gold"};
ListingInformation listings = await CurrentApp.LoadListingInformationByProductIdsAsync(productIDs);

这是 VS2012 给我的错误:

由于图像难以阅读,我在下面输入了它:

'System.Collections.Generic.IEnumerable [mscorlib, 版本=2.0.5.0,文化=中性,PublicKeyToken=7cec85d7bea7798e]' 是 不可分配给参数类型 'System.Collections.Generic.IEnumerable [System.Runtime, 版本=4.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a]'

项目模板引用“.NET for Windows Phone”和“Windows Phone”。

我之前没有遇到过这样的错误,也没有通过搜索找到任何帮助。

【问题讨论】:

  • 你使用 Resharper 吗?项目编译了吗?
  • @IgorKulman 是的,我确实使用 Resharper 8。该错误是 Resharper 错误,VS2012 的错误列表没有报告。
  • @IgorKulman 暂停 Resharper 后,错误消失,项目编译正常。感谢您为我缩小问题范围。虽然目前我不确定如何让 Resharper 停止这种行为。当我暂停它时,VS2012 突然变得难以使用 10 倍 :(

标签: c# windows-phone-8 windows-phone in-app-purchase


【解决方案1】:

这是一个 Resharper 问题。安装 Resharper 8.2.1 RC (http://www.jetbrains.com/resharper/download/)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-04-10
    • 2013-11-13
    • 1970-01-01
    • 1970-01-01
    • 2013-03-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多