I recently added SharpMap to one of my projects. Then, a different project in the same solution throws this:
An exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll but was not handled in user code
Additional information: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I search for a solution and found this: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
But in fact it does not resolve the problem:
Update-Package : Unable to resolve dependencies. 'Newtonsoft.Json 7.0.1' is not compatible with 'SharpMap 1.1.0 constraint: Newtonsoft.Json (= 4.5.11)'.
At line:1 char:16
+ Update-Package <<<< Newtonsoft.Json
+ CategoryInfo : NotSpecified: (:) [Update-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand
A bit more about the project structure that could be relevant to the problem:
"Project A" is the startup project using SharpMap. "Project B" is the one that fails, and "Project A" references "Project B".