From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I fix error with installed package: "could not load file or assembly" NationalInstruments.Daqmx.dll

Solved!
Go to solution

I have been fighting this problem for days (understatement).....

I have an installation package that used to work but now does not.  I have tried installing and running the program on a couple computers and the program crashes when loading the NI Dll's.  I have everything set to 'x86.

 

The dependency list in VS2010 is shown in the attatched screen shot.

The error text from attempting to run the app on the target machine is below in italics.

 

I sure could use some help on this!!!  Thanks in advance.

 

 

 

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'NationalInstruments.DAQmx.dll' or one of its dependencies. The specified module could not be found.
File name: 'NationalInstruments.DAQmx.dll'
at IPClientTest.MTF_Supervisor.mainSstart13()
at IPClientTest.MTF_Supervisor.mainStartByParts()
at IPClientTest.MTF_Supervisor.lblSelfTest_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Label.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34011 built by: FX45W81RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
MTF_Supervisor
Assembly Version: 1.0.3.3
Win32 Version: 1.0.3.03
CodeBase: file:///C:/mtfDebug/MTF_Supervisor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
MTF_ClassLib
Assembly Version: 1.0.1.0
Win32 Version: 1.0.1.0
CodeBase: file:///C:/mtfDebug/MTF_ClassLib.DLL
----------------------------------------
NationalInstruments.UI.WindowsForms
Assembly Version: 13.0.40.242
Win32 Version: 13.0.40.242
CodeBase: file:///C:/mtfDebug/NationalInstruments.UI.WindowsForms.DLL
----------------------------------------
NationalInstruments.UI
Assembly Version: 13.0.40.242
Win32 Version: 13.0.40.242
CodeBase: file:///C:/mtfDebug/NationalInstruments.UI.DLL
----------------------------------------
NationalInstruments.Common
Assembly Version: 13.0.40.188
Win32 Version: 13.0.40.188
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/NationalInstruments.Common/v4.0_13.0.40.188__dc6ad606294fc298/NationalInstruments.Common.dll
----------------------------------------
System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34009 built by: FX45W81RTMGDR
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
NationalInstruments.Common.Native
Assembly Version: 13.0.40.188
Win32 Version: 13.0.40.188
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_32/NationalInstruments.Common.Native/v4.0_13.0.40.188__dc6ad606294fc298/NationalInstruments.Common.Native.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Design
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

0 Kudos
Message 1 of 6
(9,175 Views)

Hi Lorne.V.

 

Seems that this can help you to solve your issue! 

 

Regards

Chris S.
0 Kudos
Message 2 of 6
(9,146 Views)

I wish that was the fix.  I do already have  ".NET framework 4.0 language support"  installed.

0 Kudos
Message 3 of 6
(9,144 Views)
Solution
Accepted by topic author Lorne.V.

Hi Lorne.V.,

 

How exactly are you installing NI DAQmx on the target machines?  Even if you include the DAQmx merge module in your build, you will still need to install DAQmx on the target machine separately. 

 

Can you also confirm that the DAQmx.dll is installed in the same directory on both the development and deployment machines?  And that you have the same version of DAQmx on both machines?

 

 

Regards,

0 Kudos
Message 4 of 6
(9,127 Views)

Thanks.  That could be the problem.  I'll post an update when I get a chance to test it.

Lorne.

0 Kudos
Message 5 of 6
(9,121 Views)

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
   at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
   at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at MindTech.clsConfig.AES_Decrypt(Byte[] bytesToBeDecrypted, Byte[] passwordBytes)
   at MindTech.clsConfig.DecryptText(String input, String password)
   at MindTech.frmClientMaster.AddRecord(DataTable dt, DataSet ds)
   at MindTech.frmClientMaster.btnShowReport_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
DMIT
    Assembly Version: 1.0.0.7
    Win32 Version: 2.0.1.5
    CodeBase: file:///D:/DMIT%20MAIN%20Software/test/DMIT.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34003 built by: FX45W81RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Management
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.33440 built by: FX45W81RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
DocumentFormat.OpenXml
    Assembly Version: 2.0.5022.0
    Win32 Version: 2.0.5022.0
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/DocumentFormat.OpenXml/2.0.5022.0__31bf3856ad364e35/DocumentFormat.OpenXml.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34004 built by: FX45W81RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

How to fix that error?

0 Kudos
Message 6 of 6
(4,675 Views)