English 中文(简体)
Json.Net NuGet (NuPack) Package Reference unable to find assembly compatible with target framework
原标题:

I am getting an error when trying to add the Json.net package reference through the NuGet / NuPack Add Package Reference Dialog. The error I get is:

Unable to find assembly references that are compatible with the target framework Silverlight,Version=4.0,Profile=WindowsPhone

I have the latest version of both the Windows Phone 7 SDK and the Package Manager tools installed. This is running in Visual Studio 2010.

Has anyone else run into this error?

问题回答

According to James Newton-King (author of Json.NET), you can use the Silverlight 3.0 version.

http://json.codeplex.com/Thread/View.aspx?ThreadId=226910

Unfortunately the NuGet package doesn t properly indicate Windows Phone 7 support. So you ll have to add the reference the old-fashioned way. (e.g. Copy the assembly into a directory such as ~libJson.NET - where ~ is your solution root - and Project... Add Reference...)





相关问题
Parsing JSON with JSON.NET

I have a JSON string: {"responseData": {"results": [ {"GsearchResultClass": "GblogSearch", "title":"u003cbu003eParis Hiltonu003c/bu003e shops at Sydney Michelle ...

Parse and filter javascript array

Our legacy code uses Newtonsoft.Json.JsonWriter to produce a javascript array like: [["1","zxc"],["2","fifa"],["3","fgh"]]. I wonder if Newtonsoft.Json provides counterparts to help filter out or ...

JSON.NET to C# objects

Im trying to use JSON.NET framework in a windows Form to read some information from a JSON string. But im struggling to get the Dictionaries from the taxonomies->topics array and the clusters { ...

Json.NET, Unable to de-serialize nullable type

I m trying to convert JSON to C# object using Json.NET. The object looks like this in C#: public class MyObject { public int? integerValue {get;set;} public DateTime? dateTimeValue {get;set;} ...

DI and JSON.NET

I m using JSON.NET to serialize and deserialize object for different purposes. I m a big fan of DI but the code below gives me the chills. Is smells like bad code: public class Foo : Baz { ...

mvc return Json() vs. JSON based Web Service

I want to expose a service on my site that any users can call and get a JSON response. In the end, I want the users to be using this service as much as possible. My site is created using the asp.net ...

热门标签