05-05-2009 03:04 PM
Hi,
I get this warning when I build my project (VB/VS 2005/MS for 2005).
No way to resolve conflict between "NationalInstruments.Common.Native, Version=8.1.20.415, Culture=neutral, PublicKeyToken=4544464cdeaab541" and "NationalInstruments.Common.Native, Version=8.1.20.165, Culture=neutral, PublicKeyToken=4544464cdeaab541". Choosing "NationalInstruments.Common.Native, Version=8.1.20.415, Culture=neutral, PublicKeyToken=4544464cdeaab541" arbitrarily.
No way to resolve conflict between "NationalInstruments.Common, Version=8.1.20.168, Culture=neutral, PublicKeyToken=4544464cdeaab541" and "NationalInstruments.Common, Version=8.1.20.165, Culture=neutral, PublicKeyToken=4544464cdeaab541". Choosing "NationalInstruments.Common, Version=8.1.20.168, Culture=neutral, PublicKeyToken=4544464cdeaab541" arbitrarily.
Consider app.config remapping of assembly "NationalInstruments.Common.Native, Culture=neutral, PublicKeyToken=4544464cdeaab541" from Version "8.1.20.165" [C:\WINDOWS\assembly\GAC_32\NationalInstruments.Common.Native\8.1.20.165__4544464cdeaab541\NationalInstruments.Common.Native.dll] to Version "8.1.20.415" [C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current\NationalInstruments.Common.Native.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "NationalInstruments.Common, Culture=neutral, PublicKeyToken=4544464cdeaab541" from Version "8.1.20.168" [] to Version "8.1.20.415" [C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current\NationalInstruments.Common.dll] to solve conflict and get rid of warning.
I have references to the following NET libraries in my project
NationalInstruments.Analysis.Enterprise
.Common
.DAQmx
.Net
.UI
.UI.WindowsForms
.VisaNS
All of the references are to files located at
C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current
Is there a conflict? Does anyone know what's going on?
Also, I don't have any explicit reference to the Common.Native library.
The app builds and runs ok. I'd just like to clean up the warnings before a final release
Thanks
Curt
Solved! Go to Solution.
05-06-2009 08:38 AM - edited 05-06-2009 08:39 AM
You can safely ignore these warnings. Sadly, they are expected, as documented in KB 3UQHBA00.
You can add entries to your app.config file to eliminate the warnings, but this has a side effect. The side effect is if in the future your application needs to reference (directly or indirectly) a newer version of Common, you'll have to update the entries in the app.config file. For example, you might indirectly need to reference a newer version of Common if you update to a newer version of NI-DAQmx.
The issue here is that Microsoft decided that it would be best to warn you if your application references two different versions of the same assembly, even when there is a policy file (as in the case of NationalInstruments.Common) that resolves the difference for you. This warning was introduced in Visual Studio 2005. I believe that the Microsoft perspective is that they can't accurately determine, at build time, if a policy file will exist at run time to resolve the difference. I think it is unfortunate that there is no good way to disable this warning if you happen to know that a policy file exists.
David Rohacek
National Instruments