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 10
(3,579 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 10
(3,556 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 10
(3,547 Views)

This is odd.

Both computers have same .NET framework ?

0 Kudos
Message 4 of 10
(3,538 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 10
(3,473 Views)

Did you follow this article Deploying Measurement Studio Applications ?

 

0 Kudos
Message 6 of 10
(3,403 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 10
(3,400 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 10
(3,379 Views)

This is a very old thread, but I ran into the same issue with missing Measurement Studio controls.  In my case I am using LED and Switch controls.  Both of these appear on my development machine, but are not shown when I install my application on another computer.  The target machine has a standalone license for Measurement Studio.  The control is actually on the screen because my event handler fires when I click the region where the Switch is.  Does anyone know what the solution is?  BabaGoud, if you're still around do you remember what the solution was?  Also, I am not getting any exceptions but BabaGoud stated that this was unrelated to the missing LED controls.  My guess is that one or more assembly references are missing but I have no idea which one(s).  I downloaded the Measurement Studio .NET Class Library help file from https://www.ni.com/docs/en-US/bundle/372636f/page/download.html and don't see any required classes that aren't included in my project.

 

Thanks for any help. 

0 Kudos
Message 9 of 10
(615 Views)

I submitted a support ticket and the NI engineer found the answer in a similar case.  The solution is to add mesa.dll to your Visual Studio installer project.  Depending on what NI software is installed on your computer, you can find mesa.dll at the following locations.

 

DanZimmermann61_0-1719351209236.png

 

I hope this helps someone! 

0 Kudos
Message 10 of 10
(602 Views)