11-24-2014 04:14 PM - edited 11-24-2014 04:16 PM
My deployed MS Visual Studio 2012 program throws an error on a target machine. The error is "The type initializer for NationalInstruments.NI4882.Internal.GPIBdll threw an error". The program was created under Windows 7. I included two NI merge modules during setup program build - mstudiogpib2010.msm and mstudiocommon2010.msm. My target machine has full admin privilege. What could be the problem here, please?
On a related note, where does the installer put the two required NI4882.dll and Common.dll?. Thanks.
11-25-2014 11:20 AM
Forgot to mention that if the target machine had National Instruments Driver 3.1.2 already installed, i am not getting the above mentioned error. My intention to include the two merge modules (as you would have guessed) was to avoid the client have to install the NI drivers separately prior to the installation of my program.
11-25-2014 12:11 PM
Hi ArticCat,
So Microsoft took away building an installer in Visual Studio 2012, which may be why you are running into problems. That being said, there is a way to build an installer for Measurement Studio in Visual Studio 2012, but I will mention that it will take some work and could be painful. Here is our documentation on that: http://digital.ni.com/public.nsf/allkb/764B727C9BD2C4C686257C970053D059
An easier option may be to switch back to Visual Studio 2010 and build the installer from that as it is supported. Here is some documentation on deploying a Measurement Studio Application with Visual Studio 2010: http://digital.ni.com/public.nsf/allkb/ED87C183E056CAC386256DF1004E54C6
I would imagine that the installer puts the dlls a path similar to this C:\Program Files (x86)\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies.
I hope some of these documents help!
11-26-2014 10:54 AM - edited 11-26-2014 11:12 AM
Thanks Rachel for the reply.
I am using Microsoft Visual Studio Professional 2013 (I had incorrectly stated earlier in the thread that I was using VS 2012) . Microsoft brought back the Visual Studio Installer with their 2012 or (2013?) version, and I am using this to build my installer. I have also inlcuded another msm in my installer, and that is working. This msm is Microsoft's Microsoft_VC100_CRT_x86.msm (VC++ redistributable package). The installer correctly installs msvcr100.dll in C:\Windows\SysWOW64\ in target machines. Due to a looming deadline, I am hesitant to switch to the NI recommended approach (WiX). However, I'll give this a try sometime later.
Back to the MS Visual Studio Installer: I am still confused as to why those two NI msm's do not get installed. Is there any special settings that I need to set in MS Visual Studio Installer?
Is there a stripped down version of the NI488.2 driver that installs only the minimum runtime drivers? If this is available, it will save the customer from installing the time consuming NI-488.2 ver3.1.2 installation.
12-01-2014 03:43 PM
So from what I understand Microsoft changed the architecture for the Visual Studio installer and unfortunately that change does not work well with out merge modules. While we are working to come up with a better solution for the installer, we don't have one yet which is why we recommend WiX to deploy merge modules. So unfortunately that is the solution we have available right now.
As far as NI-488.2 goes, what we have available is about as stripped down as it gets.
I hope this answers some of your questions, though I understand they probably aren't the answers you wanted to hear. If you have questions using with WiX, we will be happy to help working through those with you.
12-02-2014 10:47 AM
Thanks Rachel.