命名空间 System 中不存在 Json [英] Json does not exist in the namespace System
问题描述
在本教程中:http://www.asp.net/web-api/videos/getting-started/custom-validation Jon 使用
In this tutorial: http://www.asp.net/web-api/videos/getting-started/custom-validation Jon uses
dynamic error = new JsonObject();
与
using System.Json;
我猜这里是 JsonObject:http://msdn.microsoft.com/en-us/library/system.json.jsonobject(v=vs.110).aspx 位于:
I guess it's the JsonObject here: http://msdn.microsoft.com/en-us/library/system.json.jsonobject(v=vs.110).aspx located in:
- 命名空间:System.Json
- 程序集:System.Runtime.Serialization(在 System.Runtime.Serialization.dll 中)
我已经添加了 System.Runtime.Serialization 一个引用,但仍然找不到 System.Json.
I've added System.Runtime.Serialization a reference but still cannot find System.Json.
我是否读错了 Microsoft 文档?(我使用的是 .NET 4.5)
Am I reading the Microsoft docs wrong? (I'm using .NET 4.5)
推荐答案
试试这个:
PM> Install-Package System.Json -Version 4.0.20126.16343
每个:http://nuget.org/packages/System.Json
成功了!
如果您对如何添加输入 nuget 代码有疑问,请点击以下链接:http://docs.nuget.org/docs/start-here/using-the-package-manager-console
If you have questions on how to add enter nuget code, please follow the link below: http://docs.nuget.org/docs/start-here/using-the-package-manager-console
这篇关于命名空间 System 中不存在 Json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!