[英]Visual Studio 2010 cannot add Newtonsoft.Json Library
I've got a Problem with Visual Studio 2010 and the Newtonsoft.Json
library. 我在Visual Studio 2010和
Newtonsoft.Json
库中遇到问题。
A few hours ago nothing was wrong with my project, but now it throws this error 几个小时前我的项目没有任何问题,但是现在它引发了此错误
The type or namespace name 'NewtonSoft "could not be found. (Missing a using directive or an assembly reference?)
找不到类型或名称空间名称“ NewtonSoft”。(缺少using指令还是程序集引用?)
--I just saw that the Reference was deleted and i can't re-add the NewtonSoft.Json
library. -我只是看到参考已删除,所以我无法重新添加
NewtonSoft.Json
库。
You can use the package manager console to remove the package, if you're having trouble getting NuGet to uninstall or reinstall it using the GUI: 如果您无法使用GUI卸载或重新安装NuGet,可以使用软件包管理器控制台删除软件包。
Uninstall-Package Newtonsoft.Json
Be sure you've selected the right target project from the dropdown at the top of the console if your solution contains several projects. 如果您的解决方案包含多个项目,请确保从控制台顶部的下拉列表中选择了正确的目标项目。
确保项目目标的.NET Framework版本与Json.NET nuget软件包所需的版本相同或更高。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.