C# – How to remap assembly version

cnetvisual-studio-2008

Switching from debug to release build causes the Visa device to stop working and the following cryptic warning:

Target ResolveAssemblyReferences:

Consider app.config remapping of assembly "Ivi.Visa.Interop,
Culture=neutral, PublicKeyToken=a128c98f1d7717c1" from Version
"3.0.0.0" [] to Version "3.2.0.0" [dll\Ivi.Visa.Interop.dll] to solve
conflict and get rid of warning.
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets :
warning MSB3247: Found conflicts between different versions of the
same dependent assembly.

The Ivi.Visa.Interop reference properties in the VS2008 project indicate that the dll is Version 3.2.0.0.
What is the procedure to remap assembly version as suggested by the warning?

Best Answer

The situation I had, was with:

{Final Class Library}<-{Dependent Class Library}<-{Referenced DLL}

The {Referenced DLL} had multiple GAC PublicKeyToken matches.

So the {Final Class Library} compilation ignored the version referenced in the {Dependent Class Library} and used the highest Version= value. This had output with No way to resolve conflict between and Choosing ... arbitrarily etc.

Instead of assembly binding, I just added a reference in the {Final Class Library} to the {Referenced DLL}. I'm happier with this option, it seems simpler.