I have built an application using Microsoft Visual Studio 2008 and the program was running fine on my computer. It uses a NI-USB 6501 as part of the setup. We are now moving it to a testing machine onto which I installed NI-DAQmx Runtime 5 (8.7.1), as this was needed to get the USB6501 working and I didn't want to use a full NI-DAQmx installer, however when I run the program on the test machine it gives an exception:
"System.IO.FileNotFoundException: Could not load file or assembly 'NationalInstruments.Common, Version=126.96.36.199, Culture=neutral, PublicKeyToken=18cbae0f9955702a' or one of its dependencies. The system cannot find the file specified.
Is there something I am doing wrong here? Are there newer versions of the runtime with matching installs for the development machines?
Could you possibly attach a text file or image with the full error message? What about the error indicates to you that it is a problem with the DAQmx driver? I've seen issues like this come up if you are using ActiveX controls with Measurement Studio. Here is a link to a knowledgebase article that refers to that issue.
I have tried the suggestion thatyou suggested about the "Copy to Local", however that didn't fix the issue. Here is the full error message.
System.IO.FileNotFoundException: Could not load file or assembly 'NationalInstruments.Common, Version=188.8.131.52, Culture=neutral, PublicKeyToken=18cbae0f9955702a' or one of its dependencies. The system cannot find the file specified.
at InputReferredNoiseFixture.EnsureCaptureHasRunForTheseParameters() in c:\<PATH>\InputReferredNoiseFixture.cs:line 95
at InputReferredNoiseFixture.ActualChannel1InputReferredNoiseInMicroVoltsRMS() in c:\<PATH>\InputReferredNoiseFixture.cs:line 81
One strange thing is that the version number in the Visual Studio project is 184.108.40.206, not the 220.127.116.11. This is what makes me believe it may be something to do with a version difference between the NI-DAQmx Runtime 5 (8.7.1) which is installed on the testing machine and the NI-DAQmx which installed on the development machines.
Also here is the constructor for the InputSelectorHelper:
public class InputSelectorHelper
readonly DigitalSingleChannelWriter writer;
foreach(var deviceIndex in DaqSystem.Local.Devices)
var device = DaqSystem.Local.LoadDevice(deviceIndex);
if (device.ProductType == "USB-6501")
var digitalWriteTask = new Task();
digitalWriteTask.DOChannels.CreateChannel(deviceIndex + "/port0", "controlLines", ChannelLineGrouping.OneChannelForAllLines);
writer = new DigitalSingleChannelWriter(digitalWriteTask.Stream);
if(writer == null)
throw new DaqException("USB-6501 device not found");
Let me know if you need any more information.
I think the issue is that for one reason or another your deployment machine is referring to an outdated version of the Common dll. There are actually a couple of other threads that touch on how to fix this issue. These are both good threads and either one should get you to the same result. Thread one and thread two.