11-26-2014 08:24 PM
Hello all,
I hope I have the right place here.
I have a .NET utility I wrote in C# in Visual Studio 13 which I'd like to make freely available. It uses the NationalInstruments.Common and NationalInstruments.NI4882 dlls to directly read a GPIB instrument. I have LabView installed and it runs fine on my development system, but when I publish my app and try to install and run on another machine I get an unhandled exception error:
"System.TypeInitializationException: The type initializer for 'NationalInstruments.NI4882.Internal.GpibDll' threw an exception. ---> System.DllNotFoundException: The NI-488.2 Driver library cannot be found. Either Gpib is not installed, or Gpib is improperly installed. ---> System.DllNotFoundException: Unable to load DLL 'ni4882.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Am I publishing my app incorrectly, or is it not possible to include the NI dlls along with it? Are the dlls proprietary, so they'll only work if a person has LabView or equivalent installed?
Thanks for any help,
Gerrit
Solved! Go to Solution.
11-26-2014 09:42 PM
11-27-2014 01:21 PM
Thanks, Dennis. Can I rely on my app working on someone's computer regardless of how they've installed their NI-488 driver, or is there something I need to do to be able to find it on a given machine? Will my app only look for it in the folder where it exists on my machine, for example?
Gerrit
11-27-2014 03:12 PM
11-30-2014 06:07 PM
Yes, I installed the driver on my PC along with LabView, but I don't want users of my utility to be required to have LabView.
I found that you can download and install official NI-488-2 drivers at no charge from here, as long as you don't specify to install support for LabView, etc. If you just specify .NET and/or C/C++ support it installs drivers without requiring registration. So this is a good solution -- even non LabView users can get GPIB drivers from NI and use them with my utility.
11-30-2014 06:49 PM