10-09-2014 03:59 PM
I have built a C# program that measures current through a current monitor + NI USB-6008. I have a separate library for the NI stuff and added references to NationalInstruments.Common.dll and NationalInstruments.DAQmx.dll. The way I added them was to copy them to my library folder and then Right-Click References folder > Add Reference... > Select the dll from the folder. Is this the proper way or is there some other way to add the dll?
When running the program, I get the following error:
System.IO.FileNotFoundException: Could not load file or assembly 'NationalInstruments.DAQmx, Version=9.6.45.292, Culture=neutral, PublicKeyToken=4febd62461bf11a4' or one of its dependencies. The system cannot find the file specified. File name: 'NationalInstruments.DAQmx, Version=9.6.45.292, Culture=neutral, PublicKeyToken=4febd62461bf11a4'
even though the dll is included. The steps I have tried are:
1. Made the project Platform Target: x86
2. Previously I had DAQmx 9.9 installed. I removed it and installed 9.6.1
What else can I do as I have been working on this for 2 days now and nothing is working?
10-10-2014 08:34 AM
You link to the NI DLLs in the directory to which they were originally installed..
10-10-2014 08:58 AM
10-10-2014 12:30 PM
@Musent wrote:
So what would be the directory location of the 9.6.1 driver on windows 7 machine?
Just un-install and re-install to get it right. And don't mess with it afterwards.
10-10-2014 12:32 PM
10-10-2014 12:35 PM
On Windows 8.1 laptop with .NET 4.0 installed, C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current
10-10-2014 12:36 PM
10-13-2014 09:15 AM
@nyc_(is_out_of_here) wrote:
On Windows 8.1 laptop with .NET 4.0 installed, C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies\Current
I checked here and there are no DAQmx.dll files in this directory. Where would I find the dll for the DAQmx?
10-13-2014 03:54 PM
Finally got it working on my machine by uninstalling the 9.6.1 version and installing 9.9 version. Added the DLL to my project from C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current and added the same DLL to my build server.
Now, on another computer with DAQmx 9.9 or 14.0, it gives the same error as the original post. Why would it work on mine and not another computer?