ASP.NET MVC 4.0 RC and Newsoft.Json

asp.net-mvc-4, json.net

Solution

They are actually relying in third-party software (just like they ship MVC with JQuery and knockout.js). Scott Guthrie announced that MVC 4 will be shipped with JSON.NET (Newtonsoft). See below:

Json.NET: We plan to use the community developed Json.NET serialization stack in our default JSON formatter in ASP.NET Web API. Json.NET provides the flexibility and performance required for a modern web framework.

http://aspnet.codeplex.com/wikipage?title=ASP.NET%20MVC%204%20RoadMap

You can keep the System.Json.dll btw, I've got them both. If you have any problems with JSON.NET, just reinstall it :)

Problem

I just installed the ASP.NET MVC 4.0 RC build on top of a Visual Studio 2010 SP1. My project that used to compile and work with the beta version of ASP.NET MVC 4.0, raises an error when I access the site saying that the Newtonsoft.Json assembly version 4.5 can not be found. As I did not use this third party library in my current project, I configured Fusion Log to try to isolate the assembly that was relying on Newtonsoft.Json assembly. And the guilty assembly is System.Net.Http.Formatting.dll which references Newtonsoft.Json version 4.5. The beta build referenced System.Json.dll and not the Newtonsoft assembly. I can hardly believe that Microsoft is starting to rely on external assemblies even if they publish more and more code in open source. Does anyone have an explanation of what happened?

Original source