The main link cannot be resolved because it has an indirect dependency on the assembly "Newtonsoft.Json, Version = 6.0.0.0",

It really is not a question, but I am adding it here in the hope that it will help someone find a solution.

We use the RedGate SQL Comparison SDK to compare databases at runtime. About a week ago, our builds stopped working with the following error message:

C: \ Program Files (x86) \ MSBuild \ 14.0 \ bin \ Microsoft.Common.CurrentVersion.targets (1819.5): warning MSB3275: main link "RedGate.SQLCompare.Engine.UIProject, Version = 11.1. 2.54, Culture = neutral, PublicKeyToken = 7f465a1c156d4d57, processorArchitecture = MSIL "cannot be resolved because it has an indirect dependency on the assembly" Newtonsoft.Json, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed ", which was built against" .NETFramework , Version = v4.5 ". This is a higher version than the current target environment is ".NETFramework, Version = v4.0".

The interesting part is that it worked on other machines, as well as in a new Windows 10 window with VS.NET 2015. It just wouldn't work on our build machine.

I went through a bunch of things, trying to find a reason and a solution. As it turned out, we recently installed the Azure SDK v.2.8 in this field to check out some integration points. Returning to the β€œwhat changed” set of questions, we removed the Azure SDK v.2.8, and all projects were successfully built again.

Hope this helps someone save a ton of hunting in the future.

+7
json c # msbuild azure
source share

No one has answered this question yet.

See similar questions:

sixteen
Visual Studio throws "wrong" compilation exception time

or similar:

419
Resolution MSB3247 - Conflicts detected between different versions of the same dependent assembly
192
Failed to load file or assembly "Newtonsoft.Json" or one of its dependencies. The manifest definition does not match the assembly reference
fifteen
The primary link cannot be resolved because it was built against a higher version of the .NET platform than the target framework
10
Upgrading to .Net 4.5 leads to build failure?
2
Failed to load Newtonsoft.Json file or assembly.
one
Changing the target version of ASP.NET from 4.5 to 4.0
one
Microsoft.WindowsAzure.Storage.StorageException Failed to load file or assembly "Newtonsoft.Json, Version = 6.0.0.0,
0
Goals API Calendar Calendar Invalid .NET Framework
0
Visual Studio shows an error connecting to MySQL
-4
Remote asp.net structure

All Articles