Tuesday, October 8, 2013

Method not found: 'Void Newtonsoft.Json.Serialization.DefaultContractResolver.set_IgnoreSerializableAttribute(Boolean)'.

I am using MVC4 for while. Together with NuGet it works very well. Last week I updated my libraries for my solution. Running my code and BAM! Exception was thrown:

Method not found: 'Void Newtonsoft.Json.Serialization.DefaultContractResolver.set_IgnoreSerializableAttribute(Boolean)'.

Method not found? So I start searching the internet. Tried multiple solutions but nothing seems to work. In my steps to reproduce, I removed some references, like EntityFramework and OAuth.

To keep the solution short, NuGet seems to be the problem. In my steps to reproduce the problem I downloaded once the latest libraries. However, when NuGet finds out you have the library already, the solution won't be updated. So the version of my DLL was just 4.0.1 instead my latest library had version 5.0.6. After changing my projectfile to use the version of 5.0.6 everything works fine!

Ps. I updated WebGrease and Newtonsoft.Json

Happy coding!

No comments:

Post a Comment