09-06-2012 10:50 AM
Hi,
I have the NI PCI6133 card and I’m running a .NET2.0 supplied example to sample an analog input channel, using VS2005. This works fine on my office computer (Windows 7) where I run the simulated device with NIDAQmx v9.6.
I then try the same .NET2.0 example on my lab PC (OS XP Pro), also with VS2005 and NIDAQmx v9.6.
I get the following error message when I run the debugger (I get the same message whether I run the real or simulated device). The device is working properly as confirmed by MAX test panels and tasks.
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'NationalInstruments.DAQmx, Version=9.6.20.57, Culture=neutral, PublicKeyToken=4544464cdeaab541' or one of its dependencies. The system cannot find the file specified."
Source="AcqOneVoltageSample"
StackTrace:
at NationalInstruments.Examples.AcqOneVoltageSample.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at NationalInstruments.Examples.AcqOneVoltageSample.My.MyProject.MyForms.get_MainForm()
at NationalInstruments.Examples.AcqOneVoltageSample.MainForm.Main() in C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Analog In\Measure Voltage\AcqOneVoltageSample\vb\MainForm.vb:line 57
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Any help would be much appreciated.
Thanks
Ken
09-06-2012 10:55 AM
@Ken35 wrote:The error is: Could not load file or assembly 'NationalInstruments.DAQmx, Version=9.6.20.57, Culture=neutral, PublicKeyToken=4544464cdeaab541' or one of its dependencies. The system cannot find the file specified."
Try browsing to C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Assemblies\Current and add the reference to the DAQmx DLL in that subdirectory.
09-07-2012 07:11 AM
nyc that worked! much appreciated