Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

LED controls disappear when the winforms application is packaged

Hi,

 

I have been developing  a Winforms application with some of LED controls on the main form. When I run this application on my local machine in either Debug/Release mode I see LED controls being displayed with out any issue. When i created a MSI package for my application to be installed at client location in release mode the LED controls are disappearing/vanishing from the form. Rest all controls are getting loaded with out any issues.

 

Please help me.

0 Kudos
Message 1 of 8
(2,879 Views)

Hi! 

Can you upload some screenshot of both?

Are you having any error or warning during building the installer?

Which version of Measurement Studio and Visual Studio are you using?

0 Kudos
Message 2 of 8
(2,856 Views)

Hi,

 

I dont see any errors or exceptions while building the installer. I am using Visual Studio 2013 and using Measurement Studio 2015 for Visual Studio 2013 version.

 

Attached is the screen shot of both Release and Debug modes.

Download All
0 Kudos
Message 3 of 8
(2,847 Views)

This is odd.

Both computers have same .NET framework ?

0 Kudos
Message 4 of 8
(2,838 Views)

Sorry, for a delayed reply. Yes the target machine is already having .net framework 4.5 with which my project is developed as well.

 

I am not sure if this has something with the dll issues metnioned below I am facing while deploying the project on the production system.

 

System.BadImageFormatException: Could not load file or assembly 'NationalInstruments.UI.Styles3D, Version=15.0.40.49152, Culture=neutral, PublicKeyToken=dc6ad606294fc298'
or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'NationalInstruments.UI.Styles3D, Version=15.0.40.49152, Culture=neutral,
PublicKeyToken=dc6ad606294fc298' at NationalInstruments.UI.LedStyle.get_Square3D() at TestApp.View.KronosTestAppMainForm.InitializeComponent()
at TestApp.View.TestAppMainForm..ctor() WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

 

 

System.DllNotFoundException: Unable to load DLL 'nianlys.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at NationalInstruments.Analysis.Internal.s.d(Double[] A_0, IntPtr A_1, Double& A_2) at NationalInstruments.Analysis.Math.Statistics.Mean(Double[] inputData)
at TestApp.View.ImageDisplayPanel.getValueAtPoint(String name) at TestApp.View.ImageDisplayPanel.intensityGraph1_PlotAreaMouseUp(Object sender, MouseEventArgs e)

 

 

0 Kudos
Message 5 of 8
(2,773 Views)

Did you follow this article Deploying Measurement Studio Applications ?

 

0 Kudos
Message 6 of 8
(2,703 Views)

Yes. I was able to resolve the below exception by including the merge modules into my setup project. But still the issue related to LED controls missing is not resolved. 

As LED controls belong to NationalInstruments.UI.WindowsForms.LED class i am not sure if this is causing any problem when deploying the application.  These work fine on my development machine. I am not sure if I am missing anything?

 

System.DllNotFoundException: Unable to load DLL 'nianlys.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) 
at NationalInstruments.Analysis.Internal.s.d(Double[] A_0, IntPtr A_1, Double& A_2) at NationalInstruments.Analysis.Math.Statistics.Mean(Double[] inputData) 
at TestApp.View.ImageDisplayPanel.getValueAtPoint(String name) at TestApp.View.ImageDisplayPanel.intensityGraph1_PlotAreaMouseUp(Object sender, MouseEventArgs e)

0 Kudos
Message 7 of 8
(2,700 Views)

Hi

What happens if you add manually the nianlys.dll, 

here are the paths: 

32-bit system:

  • 32-bit binary: <Program Files>\National Instruments\Shared\Analysis

64-bit system:

  • 32-bit binary:  <Program Files (x86)>\National Instruments\Shared\Analysis
  • 64-bit binary:  <Program Files>\National Instruments\Shared\Analysis

 

Also. I found the next forum that can be helpful:

https://forums.ni.com/t5/Measurement-Studio-for-NET/nianlys-dll-unable-to-be-found-on-Windows-7/td-p...

 

0 Kudos
Message 8 of 8
(2,679 Views)