Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Found conflicts between different versions of the same dependent assembly that could not be resolved error

Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.

It's happened after I'm import Newtonsoft.Json to my App.Core(Portable) project.

After a look in the output:

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=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not. (TaskId:90)

What I need to do now?

like image 327
gogo Avatar asked Apr 23 '17 08:04

gogo


People also ask

Which of the following techniques can guarantee that there are no conflicts between C# assemblies that have the same name?

Strong-naming an assembly creates a unique identity for the assembly, and can prevent assembly conflicts.

Can not load file or assembly?

In summary if you get the "Could not load file or assembly error", this means that either your projects or their references were built with a reference to a specific version of an assembly which is missing from your bin directory or GAC.


2 Answers

I fixed it by updating Newtonsoft.Json package.

like image 200
Dpedrinha Avatar answered Oct 16 '22 17:10

Dpedrinha


I fixed this issue by downgrading my version of Newtonsoft.Json to 8.0.3, that was the newest version that didn't cause this error on build. I am unsure as to why this was the fix however.

like image 10
Nick Kimbrough Avatar answered Oct 16 '22 17:10

Nick Kimbrough