Json.Compact.dll for Windows CE 5.0?

Sep 22, 2010 at 6:39 PM

We are using Windows CE 5.0, .NET Compact Framework 3.5, and Newtonsoft.Json.Compact.dll.  When calling JsonConvert.DeserializeObject(), we are getting an exception:

"Could not load type 'System.Runtime.Serialization.StreamingContext' from assembly 'mscorlib, Version=, Culture=neutral, PublicKeyToken=969DB8053D3322AC'."

I suspect Newtonsoft.Json.Compact.dll is built for a later version of Windows CE.  Is there one for Windows CE 5.0?


Sep 23, 2010 at 8:21 AM

No. Download the source and modify the Compact project so it compiles.

Sep 23, 2010 at 1:35 PM

Problem is that VS 2008 won't let me open the project file ("project type is not supported by this installation").  I'll try to hack around that.

Sep 23, 2010 at 6:06 PM
Edited Sep 23, 2010 at 6:07 PM

Actually, the problem was that I didn't have the 6.0 SDK installed.

Jan 25, 2012 at 12:21 PM


Am having this same problem. That is, Could not load type 'System.Runtime.Serialization.StreamingContext' from assembly 'mscorlib, Version=, Culture=neutral, PublicKeyToken=969DB8053D3322AC'.

Am using windows mobile application. I have included a reference to the Newtonsoft.Json.dll ( windows phone) assembly in my project, and added "using Newtonsoft.Json;" line to the beginning of file. Actually i get the JSON output from WCF rest SERVICE and tried to serialize this outptut. At this situation i got the above same eeror. I could not resolve this issue.

sample code:

string url = "http://winxser4/WCFRESTCLIENT01/WidgetManager.svc/widgets";

            WebRequest request = WebRequest.Create(url);
            WebResponse ws = request.GetResponse();
            string jsonString = string.Empty;
            using (System.IO.StreamReader sreader = new System.IO.StreamReader(ws.GetResponseStream()))
                jsonString = sreader.ReadToEnd();

var myItems = JsonConvert.DeserializeObject<Widget>(jsonString); // This line thows error.

Thanks in adnvance

Jan 25, 2012 at 2:36 PM

Make sure you have all the Microsoft components and SDKs. For me, that was VS 2008, .NET 3.5, and Windows SDK 6.0. That resolved the issue for me.


Mike Valentiner

McKesson / Solution Design Group


May 5, 2012 at 1:32 PM

I have the same problem as above. Installing, reinstalling components doesn't help. I tried to install the platform on a clean virtual machine - no luck. Can somebody help?

VS 2008, .NET 3.5, and Windows SDK 6.0. Running on Windows Mobile 6.0 emulator. Error occurs when I call JsonConvert.SerializeObject();