Here’s a Visual Studio tip that falls into the category of “obvious once you know it” …

When you get this error:

Found conflicts between different versions of the same dependent assembly.

To find out further information about which assembly has been found, and which projects are affected, look in the Output window under “Build”. You’ll find a dense paragraph of information that tells you everything you need to know.

Firstly, it tells you the two assemblies that conflict:

No way to resolve conflict between

“Niche.Framework.Common, Version=2.0.611.0, Culture=neutral, PublicKeyToken=64979622e305f53d” and

“Niche.Framework.Common, Version=2.0.602.0, Culture=neutral, PublicKeyToken=64979622e305f53d”.

Next, it tells you which one it’s decided to pick:

Choosing “Niche.Framework.Common, Version=2.0.611.0, Culture=neutral, PublicKeyToken=64979622e305f53d” arbitrarily.

Then, advice on what to do if you can’t recompile:

Consider app.config remapping of assembly “Niche.Framework.Common, Culture=neutral, PublicKeyToken=64979622e305f53d”

from Version “2.0.602.0” [C:\Dev\Market Watch\src\DataValidation\Niche.MarketWatch.DataValidation.Model\bin\Debug\Niche.Framework.Common.dll]

to Version “2.0.611.0” [C:\Dev\Market Watch\lib\Niche.Framework\Niche.Framework.Common.dll] to solve conflict and get rid of warning.

The key here is that it tells you where each assembly comes from - which folder they are found within.

In my situation, the version from the lib directory is correct:

C:\Dev\Market Watch\lib\Niche.Framework\Niche.Framework.Common.dll

But the version from the bin directory is incorrect:

C:\Dev\Market Watch\src\DataValidation\Niche.MarketWatch.DataValidation.Model\bin\Debug\Niche.Framework.Common.dll

Knowing this, it’s much easier to whip through the references section of the Solution Explorer and isolate the problem.


blog comments powered by Disqus