windows-phone-7 - 为 Windows Phone 7 安装 Json.NET 时出现以下错误

标签 windows-phone-7 visual-studio-2012 json.net nuget nuget-package

我有一个针对 Windows Phone 7 的项目。我想在该项目中使用 Json.NET。但是当我尝试通过 NuGet 包管理器在我的项目中安装 Json.NET 包时,它显示:

Could not install package 'Newtonsoft.Json 6.0.1'. You are trying to install this package into a project that targets 'portable-win+net45+sl40+wp', but the package does not contain any assembly references or content files that are compatible with that framework.

我认为这是因为最新版本的 Json.NET 不支持 Windows Phone 7。如何安装旧版本的 Json.NET?最好通过 NuGet。与 Windows Phone 7 兼容的最新 Json.NET 版本是什么?

我使用的是 Visual Studio 2012。

最佳答案

在给定的链接中,存在所有版本的 json .net 命令,您可以尝试在 wp7 中支持的任何旧版本...逐一尝试:

NuGet Gallery | Json.NET

关于windows-phone-7 - 为 Windows Phone 7 安装 Json.NET 时出现以下错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21624878/

相关文章:

c# - 将 json 反序列化为字典无法正常工作

c# - 如何禁用 Windows Phone 的输入预测和字母输入校正?

silverlight - 在 Windows Phone 7 中恢复列表框的精确滚动位置

xaml - WP7 - 在类型 'Resources' 中找不到可附加属性 'PhoneApplicationPage'

c# - DropDownList 绑定(bind)到 ActionResult 创建方法 MVC 4 VS2012

c# - 样式中的 GridViewColumn 标题绑定(bind)失败

c# - HttpNotificationChannel Open() 抛出 InvalidOperationException ("Failed to open channel")

visual-studio-2012 - 使用 MSBuild 构建 installshield 安装程序时缺少某些 dll(但 VS2012 构建正确的输出)?

c# - .NET 中的 JObject.SelectToken 等效项

json - Newtonsoft.DeserializeObject 用于泛型类