07-23-2012 04:10 PM
So I created a program based off the SimpleAsynchronousReadWrite example program. I am able to communicate with my GPIB device on the development computer, but when I transfer the program to another computer I get "The type initializer 'NationalInstruments.4882.Internal.GpibDLL' threw an exception".
I realize this is a driver issue. I need the program to be run from a network of test computers (20+) and I don't want to install the ~600MB NI 488.2 Installer on each PC.
1) Is there a more compact version of the driver that doesnt include all the NI Software?
2) Is there a more portable way to do this by just including the DLL's?
More info:
*development PC windows 7, has NI 488.2 3.0.2 installed
*program in VS2010, C#, .NET4
*test PCs that throw exception: win7 and XP, no NI 488.2 installed
*I have tried including all dll's that are related to 488.2 with my release folder, still always throwing exception
Any hints or ideas would be appreciated.
Thanks,
David
07-23-2012 07:33 PM
@aenima4386 wrote:
So I created a program based off the SimpleAsynchronousReadWrite example program. I am able to communicate with my GPIB device on the development computer, but when I transfer the program to another computer I get "The type initializer 'NationalInstruments.4882.Internal.GpibDLL' threw an exception".
I realize this is a driver issue. I need the program to be run from a network of test computers (20+) and I don't want to install the ~600MB NI 488.2 Installer on each PC.
1) Is there a more compact version of the driver that doesnt include all the NI Software?
2) Is there a more portable way to do this by just including the DLL's?
More info:
*development PC windows 7, has NI 488.2 3.0.2 installed
*program in VS2010, C#, .NET4
*test PCs that throw exception: win7 and XP, no NI 488.2 installed
*I have tried including all dll's that are related to 488.2 with my release folder, still always throwing exception
Any hints or ideas would be appreciated.
Thanks,
David
You can do it the way you want to do it, or you can do it the way NI meant for you to do it.
Up to you.
07-24-2012 02:12 PM
Hi aenima4386, actually installing the driver is required to create the correct references to the DLLs and some other operating system stuf, since your goal is pushing this via network you can plan creating an installer and include the 488.2 driver with it, in that way you will not need to install it apart.
You can check the link: How Can I Include Additional Installers with My LabVIEW Applications' Installer? if you have any doubt about the process.
Regards,
Eric NI
07-25-2012 06:13 PM
Thanks Eric. Sounds like this is my best option. I'll give it a shot.
01-27-2016 04:57 PM
Hi Eric,
I got the same problem in another computer, just like the case with 'aenima4386', my program works fine in most comuputers, but got 'the type initializer for 'nationalInstruments.NI4882.Internal.GpibDll' threw an expception.' in another comuputer! Below are some information in the computer:
- Windows 7
- 32 bits <-- is it possible the root casue?
-- I found drivers are installed in the C:\Program Files, but not C:\Program Files (x86)
-- From above, so I copies all DLL files in my local (in my program folder)
- NI488.2 2.7.3, I always used "default" setting when installing NI driver
- I used VS2012/C# to compile my program in my computer, and execute in this "problem" computer
- I don't think I should insall extra LavView libraries, should I?
Please give me your suggestion is there something I miss? Or what I should do?
Very thkanks for your help...
01-28-2016 10:09 PM
Hello chlo41,
Do you mind pasting the full text of the error? I am hoping there will be some more clues in there.
It looks like Eric and the previous posters may be long gone from the forums, but I want to make sure you have a chance to have your question looked at.
Are your NI-488.2 drivers the same version across multiple computers?
Do the solutions presented in the discussions below have any effect on the error?
Deploy a .NET app with NI dlls?
01-29-2016 09:02 AM
Hi Alex,
Thanks for your support, and below are my feedback information for your kindly help. You can find figures and text file for your reference in <Win7 32.zip> or <Win7 32.7z>
- <NationalInstruments.Common.dll> 8.7.35.131
- <NationalInstruments.Common.Native.dll> 8.7.35.131
- <NationalInstruments.NI4882.dll> 8.9.35.104
Runtime version is v2.0.50727
For your information
[Question]
- Do you think 32 bits OS is key point?
- Should I find DLLs with different versions?
- Is it ok if I used VS2012? Or I should use older version?
- What else information I should provide? Or something above are not clear, please let me know.
Thanks again for your help, and I hope the error must be resolved because the program is very important for me, and it should be workable in the "problem" computer!!
02-01-2016 08:24 AM
Hi chlo41,
I have seeing some other forums with similar issues, so I think you can take a look, they may be helpful:
Also this document has some information about your case:
http://digital.ni.com/public.nsf/allkb/70648C253C7155FD862570ED005EA94E?OpenDocument
Hope this will help you!
Regards
M
02-02-2016 04:21 PM
Hi Mikirius,
Thanks for your kindly suggestion, and I've checked some issues you provided.
But unfortunely, I still got the same error I mentioned in original post!
Below are my test results
Regarding to above results, if there something I misunderstanding or needed to be tried, please let me know
Very thanks for your help...
02-03-2016 09:02 AM
Hi chlo41,
I saw in your first post that in most of your computers your code works fine, lets start from there, what is the difference between the computers that the code works from the one that does not?
could you please let me know what is the system configuration from the ones that work and the one that does not? (Windows version, Visual Studio version, measurement studio version, drivers versions, etc.)
For me it looks that there is some in-compatibility issue or something like that, also the think that you did copying the dll from programs files to (x86) not usually work depends if the dll is calling some others dlls or if has some dependencies (also if it needs to be installed or just drop in the target file).
We will go from there
regards
M