Apr 28, 2012

Found conflicts between different versions of the same dependent assembly


I am currently developing a .NET 2.0 application, which consists of 10+ projects.

The problem is that, if I include an external component always get the following warning while building: Can see only one line message in errors window like below,

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

What exactly does this warning mean and is there a possibility to exclude this warning? OR
How to find which assembly actually this warning referring to?


=>> How to find the exact details of dependent assembly the warning is referring,
Change the "MSBuild project build output verbosity" to "Detailed" or above. To do this, follow these steps:
  1. Bring up the Tools/Options dialog (Tools->Options...).
  2. In the left-hand tree, select the Projects/Solutions node, and then select Build and Run.
    • Note: if this node doesn't show up, make sure that the checkbox at the bottom of the dialog ("Show all settings") is checked.
  3. In the tools/options page that appears, set the MSBuild project build output verbosity level to "Detailed" (assuming you're on VS2010; "Normal" will suffice in VS2008 or older).
  4. Build the project and look in the output window.
Now you can find as trace like the following,
Target ResolveAssemblyReferences:
    Consider app.config remapping of assembly "NUnit.Framework.dll, ..." 
        from Version "" to "NUnit.Framework.dll Version "" ......
        to solve conflict and get rid of warning.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0\Microsoft.Common.targets : 
        warning MSB3247: Found conflicts between different versions of the same dependent assembly.

My specific case was an incorrect reference to NUnit.Framework. See above, I had two projects referencing two different versions of NUnig. I went to the project with the older version, removed the reference, then added the correct reference. Now it is working fine without this warning..