Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0
A lot of things can go wrong and this error message tells you nothing.
But still I am facing the same issue.
Maybe the easiest way will be to try and reinstall the package.
Go to TOOLS > NuGet Package Manager and Select Package Manager Console. Execute the following two commands:
uninstall-package newtonsoft.json -forceinstall-package newtonsoft.json
If you still get an error after doing this, then what worked for me eventually is that I deleted Json.Net's section from my .config file. Reinstall brings it back if it's not there and apparently you need to delete it. Until there will be a normal solution in the package itself, I'm afraid this manual step is a must. In package manager console again execute:
Update-Package –reinstall Newtonsoft.Json
Also take a look at your .Net version of the projects in your solution.
This is the Microsoft solution with unloading the project.
I had the same issue. I followed ekostadinov's forced uninstall/reinstall steps, but needed to add one extra step:
I was upgrading my Solution to Framework 4.5.2. My old Web.Config file had a namespace in the configuration tag.
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
I updated to:
<configuration>
Then the bindingRedirect should work for whatever version of NewtonSoft you are using:
<runtime xmlns=""> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" /> </dependentAssembly></assemblyBinding>
This can happen if package.config contains 2 same packages name with a different version.
For Example,
<package id="System.Spatial" version="5.6.2" targetFramework="net45" /><package id="System.Spatial" version="5.6.4" targetFramework="net45" />
Thank You.