JSON.NET Visual Studio 2008 and .NET 3.5 Compact Framework

妖精的绣舞 提交于 2019-12-05 11:51:18

I don't think NuGet will help you here. Json.NET removed support for the .NET 3.5 Compact Framework in release 4.0.1, as is stated in the 4.0.1 release notes:

Other major changes in this release are two new builds and the removal of an existing build. Removed is Compact Framework. VS2010 no longer supports Compact Framework so 3.5 r8 will be its last release if you are targeting the Compact Framework.

The most recent version of Json.NET that does support it is 3.5.8, which you can download manually from here:

https://github.com/JamesNK/Newtonsoft.Json/releases/download/3.5.8/Json35r8.zip

Having manually downloaded Json35r8.zip, you can unzip the file, navigate to Json35r8\Bin\Compact, and manually add a reference to Newtonsoft.Json.Compact.dll using the Add Reference dialog box.

Note that Json.NET 3.5.8 is old enough that some basic things are broken. See e.g. JSON.net CF 3.5, verify that JSON is complete for an example.

You should replace your.package.name by Newtonsoft.Json
Full argument is: install Newtonsoft.Json -excludeversion -outputDirectory .\Package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!