Moving to JSON.NET 4.0.3 Broke My Application

I have a Windows Phone 7.1 (Mango) application using JSON.NET 4.0.2.

I updated it to version 4.0.3 and now I get all kinds of errors.

The edited class that worked before this now throws this error: Failed to load type 'System.Dynamic.IDynamicMetaObjectProvider' from the assembly 'System.Core, Version = 3.7.0.0, Culture = neutral, PublicKeyToken = 969DB8053D3322AC'.

I also use the Linq function using JArray, and now I get this message: {"Unable to load Newtonsoft.Json.Linq.JArray type 'from the assembly' Newtonsoft.Json, Version = 4.0.3.0, Culture = neutral, PublicKeyToken = 30AD4FE6B2A6AEED ' . " }

I tried to clear the solution. I tried again to copy the DLL.

Any suggestions?

0
source share
1 answer

The problem is that Windows Phone 7.1 installs the Silverlight 4 build by default unless an explicit Silverlight 4 WP build is specified. Silverlight 4 has features not available for WP, so this causes Json.NET to interrupt.

This will be fixed in 4.0.5 using the current version of Windows Phone 7.0 for 7.1, but now to fix the problem just change the link to the dll to the Newtonsoft.Json.dll file in the sl3-wp directory.

+1
source

All Articles