01-26-2009 02:05 PM
When I try to access the NationalInstruments.DAQmx.dll assembly (or load an object that does) I get the following exception:
A first chance exception of type 'System.IO.FileLoadException' occurred in AxMFX.dll
Additional information: Could not load file or assembly 'NationalInstruments.DAQmx, Version=8.3.20.13, Culture=neutral, PublicKeyToken=4544464cdeaab541' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have the project (C#) which this is referencing the 8.3 version of DAQmx, but I am deploying the 8.7 version. I am surprised that this is a problem because in the projects properties I have "Specific Version" set to false.
Is this a problem with the NI assemblies (they possibily only support specific versioning) or is it a problem with my code?
01-27-2009 03:06 PM
Regards,
Dan King
01-27-2009 04:05 PM
They are both running out of the same path;
\bin\myDaqmx.dll
\bin\NationalInstruments.DAQmx.dll
I think that the problem has to do with versioning because when I built myDaqmx.dll with reference to version 8.3, but deploy the merge module for 8.7 (or just install the 8.7 version directly) I see this, but not when I deploy the 8.3 version.
I am puzzle because I have the "specific version" property turned off in visual studio.
01-29-2009 09:34 AM
Regards,
Dan King
01-29-2009 09:47 AM
Dan-
Actually, everything works fine when I change the reference in the project to version 8.7, however, I also see the problem when I change the reference in the project to 8.8, and deploy with 8.7. It would seem as though you have to reference and install the same version, even if you have specific version set to false.
I have the merge module for 8.7 because when I started working on a different project that also used NI, I downloaded that for the install.
I then inherited this current project from a colleague who had starting working on it about a year and a half ago, against version 8.3 In order to try to isolate the project, he first added a reference to the 8.3 drivers he had on his system, with the copy local flag set. He then built the project and removed the original reference and added a local path reference to the files that had just been copied over locally.
I now have the installation "working" by not using the merge module, but by installing the files that are built with the project (version 8.3, or whatever version the project is built against).
The version of the DAQmx drivers on the target computers does not seem to matter, we have a mix on our test PCs, between 8.6, 8.7, and 8.8. If 8.9 is out, we will start using that.