无法安装:Newtonsoft.Json

use*_*754 5 c# nuget windows-phone-8

我想在我的Windows Phone项目中下载并解析JSON,所以我决定newtonsoft.json通过Visual Studio中的Nuget 下载库,但我收到以下内容:

PM> Install-Package Newtonsoft.Json
Successfully installed 'Newtonsoft.Json 6.0.1'.
Successfully uninstalled 'Newtonsoft.Json 6.0.1'.
Install failed. Rolling back...

Install-Package : Could not install package 'Newtonsoft.Json 6.0.1'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the package does not 
contain any assembly references that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
 + Install-Package Newtonsoft.Json
 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
 + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Run Code Online (Sandbox Code Playgroud)

Day*_*yan 2

从这里下载组件(又名 DLL):http://james.newtonking.com/json

注意:请确保删除您拥有的旧 Newtonsoft 组件的任何以前的 Nuget 痕迹。只是为了确保在尝试执行此操作之前一切都清楚。

  • 下载后,将压缩文件的内容提取到文件夹中。
  • 您将看到两个目录,BinSource。您关心的是目录Bin
  • 您将在 中找到其他目录Bin,选择与您选择的框架相对应的目录。.NET 3.5?4.0?转发?
  • 您会发现Newtonsoft.Json.dll将此副本复制到项目bin文件夹内的项目目录中Debug
  • 在 Visual Studio 中打开您的项目,右键单击References Folder项目名称下的 并选择Add Reference
  • 单击Browse并找到Newtonsoft.Json.dll,如有必要,单击“应用”,然后单击“确定”。