01-20-2009 09:02 PM
Hi:
I am writting code in C#. When I complie the code I received the following warning message:
Referenced assembly 'C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current\NationalInstruments.Common.Native.dll' targets a different processor than the application.
Referenced assembly 'C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current\NationalInstruments.VisaNS.dll' targets a different processor than the application.
Referenced assembly 'C:\WINDOWS\assembly\GAC_32\NationalInstruments.Analysis.Enterprise\8.0.20.334__4544464cdeaab541\NationalInstruments.Analysis.Enterprise.dll' targets a different processor than the application.
What does this mean?
My project is referencing the NationalInstruments.Common.Native.dll at the location mentioned in the warning message but it still give the warning message.
How the linker search for the NI dll? In ...\DotNET\Assemblies\Current\ folder or GAC folder?
For the NationalInstruments.Analysis.Enterprise.dll, I actually manually copy a newer version into the \DotNET\Assemblies\Current\ folder and GAC_32\NationalInstruments.Analysis.Enterprise folder, \NationalInstruments.Analysis.Enterprise\8.1.20.472__4544464cdeaab541 but the linker still think the older version is the latest. May I know why?
Hope to hear any reply.
Thank you.
Regards,
Chin Lin
01-21-2009 09:22 AM
I would expect these warnings if you are compiling the application for a 64-bit platform (or maybe for "any platform"). The Measurement Studio libraries can only be used in 32-bit applications. You can run 32-bit applications on a 64-bit OS, but the application itself must be 32-bit. This is documened in our help under the "Using Measurement Studio on 64-Bit Operating Systems" topic.
You just need to set your Platform target option in your Build settings to x86 and this will solve your problem.
Best Regards,
01-21-2009 08:09 PM
Hi Jonathan:
Thanks for your reply. Yes, it works. May I know where the system search for the NI dll? at \DotNET\Assemblies\Current\ or GAC_32\NationalInstruments.Analysis.Enterprise folders?
Thank you.
Regards,
Chin Lin
01-22-2009 08:09 AM
At design time the assemblies are picked up from the \DotNET\Assemblies\Current directory. At runtime, the .NET CLR takes over and locates the assemblies according to its algorithm. The GAC is one of the places it searches.
Best Regards,