0

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

I upgraded it to 4.0.3 and now I get all kinds of error.

A deserialized class that was working before is now throwing this error : Could not load type 'System.Dynamic.IDynamicMetaObjectProvider' from assembly 'System.Core, Version=3.7.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC'.

I also make use of the Linq feature by using JArray and now I get this message: {"Could not load type 'Newtonsoft.Json.Linq.JArray' from assembly 'Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30AD4FE6B2A6AEED'."}

I tried cleaning the solution. I tried copying the DLLs one more time.

Any suggestions?

1 Answers1

1

The problem is that Windows Phone 7.1 defaults to the Silverlight 4 build if no explicit Silverlight 4 WP build is specified. Silverlight 4 has features that aren't available on WP which is why this causes Json.NET to break.

This will be fixed in 4.0.5 by having the current Windows Phone 7.0 dll used for 7.1 but for now to fix the problem just change the dll reference to the Newtonsoft.Json.dll file in the sl3-wp directory.

James Newton-King
  • 48,174
  • 24
  • 109
  • 130