Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0' - However binary exists in bin folder
.net, c#, dependencies, json, reference
Solution
In package manager console execute: Update-Package –reinstall Newtonsoft.Json.
source
Problem
I am trying to do something pretty simple here, and I've been stuck on it for several hours. I feel like I've exhausted almost every option. All I am trying to do is: `JsonConvert.SerializeObject(model)` However, the resulting error is: Exception thrown: 'System.IO.FileLoadException' in mscorlib.dll Additional information: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=982hs0cm1kd' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) However, in my project, I am referencing version 10.0.0.0. More Specifically, 10.0.2.0. When I checked my bin folder for the project, I can verify that the 10.0.2.0 dll is there. In packages.config, I have `<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net452" />` Things I have tried: - Manually deleteing the bin/obj folders from the project and rebuilding - Manually Modifying the Web.Config file to ensure the right version in the binding redirect. - Updating the Reference Property 'Specific Version' to False - Manually delete all of the files in `C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root` I am really stuck here, and I can see this is a common problem as I found a lot of different approaches to fix it, however none have worked so far. Any ideas?