Conflicts were found between different versions of the same dependent assembly that could not be fixed.

Conflicts were found between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when detailed log information is specified.

This happened after I imported Newtonsoft.Json into my App.Core (Portable) project.

Look at the exit:

There was a conflict between "Microsoft.CSharp, Version = 2.0.5.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" and "Microsoft.CSharp, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a, (TaskId: 90) 2> "Microsoft.CSharp, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" was not selected because it was primary, and "Microsoft.CSharp, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" was not . (TaskId: 90)

What do i need to do now?

+14
source share
6 answers

I fixed this problem by downgrading my version of Newtonsoft.Json to 8.0.3, it was the newest version that did not cause this build error. I'm not sure why this was a fix.

+7
source

I fixed it by updating the Newtonsoft.Json package.

+7
source

Newtonsoft.Json relies on a newer version of the Microsoft.CSharp assembly than your project refers to. You can remove the link to the old library and add a new one. A newer one may be in your package directory for your solution, or you may receive a NuGet package. In my case, the only link that depended on the old version of the CSharp library was by itself, so there was no harm.

+1
source

I was able to fix this by adding the Microsoft.CSharp NuGet package project to the project. Previously, I just had a link to the Microsoft.CSharp assembly using the project links, but I did not use NuGet to insert it. After using NuGet, the message on my VSTS build server is gone.

+1
source

The problem is that Newtonsoft.Json NuGet, after I lowered its version, the warning just go.

There is probably a plugin issue in Windows 10.

0
source

It may be a little late to answer this question, but this is because there is a known problem with certain versions of the NuGet client that causes a build error in the Xamarin.iOS and Xamarin.Android projects when they have a link to these build packages. The error message will say something similar to

warning MSB3277: Conflicts were detected between different versions of the same dependent assembly that could not be resolved. These link conflicts are listed in the build log when the log detail is set to verbose.

To solve this problem, remove the following links from the project for the Xamarin.iOS and Xamarin.Android platforms. Leave the package, just remove the links from the Links folder. You should be able to build at this point.

  • System.Runtime

  • System.io

  • System.Threading.Tasks

See this MSDN blog post for more information about this error.

0
source

Source: https://habr.com/ru/post/1270239/


All Articles