0

I'm using Visual Studio 2012 for Windows Phone 7 and this is my first app. When I'm trying to deserialize a JSON string with JSON.NET I always get this weird error :

Missing method : r rlib, Version=3.7.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC.System.Threading.Monitor.

Here is a snippet of my code that deserialize my JSON string:

public void DeserializeFeed(string feed)
{
    JsonSerializer ser = new JsonSerializer();
    //JsonReader jr = new JsonTextReader(new StreamReader(feed));
    Post deserializedPost = JsonConvert.DeserializeObject<Post>(feed);
}

I post here debug step by step mode, to give more accurate Informations:

DEBUG STEP BY STEP MODE

Can anyone help me please ? Hope I'm clear !

0

1 Answer 1

3

I searched the error you had and it seems to be a widespread problem. I did, however, find a thread on another site which claims to have solved it: http://windowsphonegeek.com/articles/WP7-InputPrompt-in-depth

After hours of debugging I was able to trouble shoot the Error and compile the code and use the control. Simply copied the libraries (Coding4Fun Phone Controls & Microsoft Phone Controls Toolkit) from the Message Prompt example I had downloaded. Here is the link for it. http://www.windowsphonegeek.com/articles/Coding4Fun-WP7-Message-Prompt-in-depth

I do not have a phone to test the solution on, so I can't peak from experience, but it does look promising.

PS. The actual deserialisation looks fine to me.

(I'd have put this in a comment rather than an answer, but I don't have the privilage yet, sorry if this offends)

Sign up to request clarification or add additional context in comments.

6 Comments

Thanks for your answer, Yes it's the same kind of error but the user deal with another library, I'm actually trying to use JSON.net and i get this weird error, anyone knows from where it comes ?
Have you definitely included the correct library (Looks like the Silverlight version of the dll source:eugenedotnet.com/2010/12/windows-phone-7-serialization-json-net)? Some other errors which people have been having seem to derive from trying to use libraries which use windows specific parts of the .NET framework on the phone.
Yes I've added it, but I've just checked it and switched in my reference library the NewtonSoft.Json.dll to another file that I've found on "Signed" folder and it WORKS!! thanks again for your quick and efficient help ;D
Sorry, I'm come back to this really weird problem because after a recompiling, I get this error another time and I'm completely confused with this, please if someone know this error, help me!
So, the definitive answer to this weird problem is to use NewtonSoft.Json.Silverlight instead NewtonSoft.Json for Windows Phone 7 Silverlight application. You can retrieve this DLL in this project : eugenedotnet.com/edimages/WindowsPhone7/Lesson18_Serialization/…
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.