使用System.Json在.net 4.5中不存在

Kom*_*ala 6 c# asp.net dll json asp.net-mvc-4

我复制了以下代码:

protected override bool CanWriteType(Type type)
        {
            // don't serialize JsonValue structure use default for that
            if (type == typeof(JsonValue) || type == typeof(JsonObject) || type == typeof(JsonArray))
                return false;

            return true;
        }

protected override bool CanReadType(Type type)
        {
            if (type == typeof(IKeyValueModel))
                return false;

            return true;
        }
Run Code Online (Sandbox Code Playgroud)

在这里,JsonValue,JsonObject,JsonArray,IKeyValueModel需要System.Json dll,它在.net 4.5框架中不可用.

我已经将nuget包更新到5.0,但仍然是那个dll不可用.任何人都可以直接给我dll或者可以给我System.Json dll的步骤?

我曾尝试使用Silverlight的System.Json.dll,但它根本不起作用