We have answer of your question!

100% solved queries, no empty question

Question: Warning: Found conflicts between different versions of the same dependent assembly


0

Advertisement


I am currently developing a .NET application, which consists of 20 projects. Some of those projects are compiled using .NET 3.5, some others are still .NET 2.0 projects (so far no problem).

The problem is that if I include an external component I always get the following warning:

"Found conflicts between different versions of the same dependent assembly".

What exactly does this warning mean and is there maybe a possibility to exclude this warning (like using #pragma disable in the source- code files)?

Question author Ollifant | Source

Answer


1


Advertisement


This warning means that two projects reference the same assembly (e.g. System.Windows.Forms) but the two projects require different versions. You have a few options:

  1. Recompile all projects to use the same versions (e.g. move all to .Net 3.5). This is the preferred option because all code is running with the versions of dependencies they were compiled with.

  2. Add a binding redirect. This will suppress the warning. However, your .Net 2.0 projects will (at runtime) be bound to the .Net 3.5 versions of dependent assemblies such as System.Windows.Forms. You can quickly add a binding redirect by double-clicking on error in Visual Studio.

  3. Use CopyLocal=true. I'm not sure if this will suppress the warning. It will, like option 2 above, mean that all projects will use the .Net 3.5 version of System.Windows.Forms.

Here is a utility to identify the offending reference(s):

https://gist.github.com/1553265

Answer author Brian-low

Advertisement


Tickanswer.com is providing the only single recommended solution of the question Warning: Found conflicts between different versions of the same dependent assembly under the categories i.e .net , compiler-construction , warnings , . Our team of experts filter the best solution for you.

You may also add your answer!