Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't run my program after installing it on another PC

I created an installed project and tried installing my program on another PC. It won't run and throws the following error. Any ideas?

*** Exception Text ***

System.TypeInitializationException: The type initializer for "DEER_DAQ.modDeclarations" threw an exception. ---> System.IO.FileNotFoundException: File or assembly name NationalInstruments.DAQmx, or one of its dependencies, was not found.

File name: "NationalInstruments.DAQmx"

at DEER_DAQ.modDeclarations..cctor()

--- End of inner exception stack trace ---

at DEER_DAQ.modFunctions.ReadInit()

at DEER_DAQ.frmMain.frmMain_Load(Object sender, EventArgs e)

at System.Windows.Forms.Form.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

at System.Windows.Forms.ContainerControl.WndProc(Message& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

*** Loaded Assemblies ***

mscorlib

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2032

CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll

----

DEER DAQ

Assembly Version: 1.0.2329.15806

Win32 Version: 1.0.2329.15806

CodeBase: file:///C:/DEER%20DAQ/DEER%20DAQ.exe

----

System.Windows.Forms

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2032

CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll

----

System

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2032

CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll

----

System.Drawing

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2032

CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll

----

NationalInstruments.UI.WindowsForms

Assembly Version: 8.0.11.236

Win32 Version: 8.0.11.236

CodeBase: file:///c:/windows/assembly/gac/nationalinstruments.ui.windowsforms/8.0.11.236__4544464cdeaab541/nationalinstruments.ui.windowsforms.dll

----

NationalInstruments.UI

Assembly Version: 8.0.11.236

Win32 Version: 8.0.11.236

CodeBase: file:///c:/windows/assembly/gac/nationalinstruments.ui/8.0.11.236__4544464cdeaab541/nationalinstruments.ui.dll

----

NationalInstruments.Common

Assembly Version: 8.0.11.194

Win32 Version: 8.0.11.194

CodeBase: file:///c:/windows/assembly/gac/nationalinstruments.common/8.0.11.194__4544464cdeaab541/nationalinstruments.common.dll

----

Accessibility

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.573

CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll

----

System.Web

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2037

CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll

----

System.Design

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2032

CodeBase: file:///c:/windows/assembly/gac/system.design/1.0.5000.0__b03f5f7f11d50a3a/system.design.dll

----

Microsoft.VisualBasic

Assembly Version: 7.0.5000.0

Win32 Version: 7.10.6001.4

CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll

----

System.Xml

Assembly Version: 1.0.5000.0

Win32 Version: 1.1.4322.2032

CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll

----

NationalInstruments.UI.Styles3D

Assembly Version: 8.0.11.236

Win32 Version:

CodeBase: file:///c:/windows/assembly/gac/nationalinstruments.ui.styles3d/8.0.11.236__4544464cdeaab541/nationalinstruments.ui.styles3d.dll

----

 

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 1 of 8
(5,727 Views)

The program directory is as follows:

 Directory of C:\DEER DAQ

05/18/2006  10:21 AM    <DIR>          .
05/18/2006  10:21 AM    <DIR>          ..
05/18/2006  10:09 AM    <DIR>          bin
05/18/2006  10:02 AM    <DIR>          Data
05/18/2006  09:53 AM           360,448 DEER DAQ.exe
05/18/2006  10:04 AM               901 DEER DAQ.sln
05/18/2006  10:05 AM             1,815 DEER DAQ.vbproj.user
05/18/2006  10:06 AM                 0 Error Log.txt
05/27/2005  02:06 AM        10,095,808 EXCEL.EXE
08/04/2004  06:00 AM            32,256 iashlpr.dll
05/16/2006  02:50 PM               280 Init.txt
05/27/2005  02:06 AM         1,089,536 Interop.Excel.dll
08/04/2004  06:00 AM             7,168 Interop.IasHelperLib.dll
05/18/2006  10:21 AM    <DIR>          Lookup Tables
05/17/2005  09:40 AM            64,088 Microsoft.Vbe.Interop.dll
03/18/2003  08:14 PM           499,712 msvcp71.dll
02/21/2003  04:42 AM           348,160 msvcr71.dll
10/14/2005  05:43 PM            62,400 NationalInstruments.Analysis.Standard.dll

10/10/2005  02:58 PM         1,449,472 NationalInstruments.DAQmx.dll
07/12/2004  08:42 PM           102,920 NationalInstruments.NI4882.dll
10/14/2005  05:20 PM         1,168,320 NationalInstruments.UI.dll
10/14/2005  05:14 PM           307,200 NationalInstruments.UI.Styles3D.dll
10/14/2005  05:30 PM           263,104 NationalInstruments.UI.WindowsForms.dll
09/30/2005  10:46 PM           177,088 NationalInstruments.VisaNS.dll
05/18/2006  10:03 AM    <DIR>          obj
05/17/2005  09:40 AM           223,800 Office.dll
05/17/2005  09:40 AM            16,384 stdole.dll
              21 File(s)     16,270,860 bytes
               6 Dir(s)  114,142,150,656 bytes free

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 2 of 8
(5,723 Views)
Nevermind.  I needed to install the NI-DAQ drivers first, which were uninstalled when I pulled Measurement Studio from that PC.
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 3 of 8
(5,722 Views)

OK...  As soon as I uninstall Measurement Studio I can't run my installed application anymore.  It may have something to do with the licensing files.  How can I fix this problem?

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 4 of 8
(5,716 Views)
Is it still giving you the same error message?  Because the first error message implies that you are missing the DAQmx assemblies.  Also are you using .NET to create your installer or are you using another third party program?  If you are using .NET, it will take care of most of the licensing details for you.  This Knowledgebase shows the preferred method of distribution for .NET applications.

Thanks,
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 5 of 8
(5,708 Views)

I am using VS.NET 2003 and Measurement Studio 8.0 to build this application.  It will work on a PC that has Measurement Studio and NI-DAQ installed, but will not work on a PC that only has NI-DAQ installed.  The error message is different now.  I can run the application and it won't show up although I can see it using memory under the Task Manager.  After about a minute it pops up with a message saying it can't run.

On the PC with Measurement Studio it was giving me license file errors until I pasted the license files where the MS.NET install is supposed to place them - a glitch that is becoming fairly annoying.  I have four copies of MS 8.0 and they all seem to forget to include the license files about half the time I install them so I have the files stored on a network drive so I can paste them as necessary.

To be thourough....

I unintalled MS 8.0 (which also took out NI-DAQ) and installed my program.  It wouldn't work.  I installed NI-DAQ and it still wouldn't work, but I needed it so I reinstalled NI-DAQ.  Then I thought to try it and it worked.  Then I uninstalled MS 8.0 and it wouldn't work anymore so I had to reinstall MS 8.0 again.

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 6 of 8
(5,706 Views)
Are you following the instructions that are listed in that Knowledgebase for creating an installer for your application to distribute it to another PC?  Also could you post the specific error message that is popping up?
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 7 of 8
(5,702 Views)
I did install it according to those instructions and it works now.
 
Thanks!
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 8 of 8
(5,696 Views)