Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with versions in NI-DAQmx Runtime

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=8.5.35.147, Culture=neutral, PublicKeyToken=18cbae0f9955702a' or one of its dependencies. The system cannot find the file specified.

at ...

..."

 

Is there something I am doing wrong here?  Are there newer versions of the runtime with matching installs for the development machines?

 

Regards,

mdubs

0 Kudos
Message 1 of 4
(2,479 Views)

Hi mdubs,

 

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. 

 

Chris W

0 Kudos
Message 2 of 4
(2,461 Views)

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=8.5.35.147, Culture=neutral, PublicKeyToken=18cbae0f9955702a' or one of its dependencies. The system cannot find the file specified.
at <NAMESPACE>.InputSelectorHelper..ctor()
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 8.6.35.131, not the 8.5.35.147.  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:

 

namespace <NAMESPACE>
{
public class InputSelectorHelper
{
readonly DigitalSingleChannelWriter writer;

public InputSelectorHelper()
{
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);
break;
}
}

if(writer == null)
{
throw new DaqException("USB-6501 device not found");
}
}
}
}

Let me know if you need any more information.

 

Regards,

Michael

0 Kudos
Message 3 of 4
(2,434 Views)

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.

 

Chris W

Message Edited by Chris W. on 01-28-2009 11:25 AM
0 Kudos
Message 4 of 4
(2,418 Views)