Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Other problem Deploying App

Hello,

I have develop an App using NationalInstruments.UI.WindowsForms library. I have no problem executing the App in the computer where the App was developped. But when I try to run the .exe in other computer an Exception is show: 'System.IO.FileNotFoundException' he can`t find NationalInstruments.UI.WindowsForms.

when I generate the App only one file is created, the App.exe (no dll's files).

I have to do some especial tu make my App portables?

Pd: Sorry for my English...again.

Thanks a lot,

Kiko llaneras.
0 Kudos
Message 1 of 23
(6,932 Views)
How are you deploying the app? Are you creating an installer for the application and running the installer on the other computers or are you just copying the App.exe file? At a minimum, your application will also need NationalInstruments.Common.dll, NationalInstruments.UI.dll, and NationalInstruments.UI.WindowsForms.dll on the other machines, and there could be more that it needs depending on what else you're using. Is your application using any other Measurement Studio libraries other than UI? Is your application using any 3D styles with the UI components?

- Elton
0 Kudos
Message 2 of 23
(6,931 Views)
Hello,

1) I am just generating the project (debug) and copying the App.exe file.

2) I am using only NationalInstruments.UI library.

3) I think that I am not using 3D Styles, I don't remember that now, I will see the code tomorrow morning.

Sorry, but I am neewby using Measurement Studio and with .NET, I am sure that I am doing something wrong.

When I generate the project the dll files are not generated. I think that I must "do" something more...

Thanks a lot for your fast help,

Kiko Llaneras.
0 Kudos
Message 3 of 23
(6,931 Views)
The easiest approach would be to create a Visual Studio .NET setup project for your application. The setup project should detect the dependencies that you're using and automatically pull in the merge modules that it needs for your application. You could then build an .msi from the setup project and run it on the the other computers and that should properly set up your application.

If you prefer to deploy your application by just copying the files over, you will need to also copy NationalInstruments.Common.dll, NationalInstruments.UI.dll, and NationalInstruments.UI.WindowsForms.dll with your application. These assemblies should be copied to the same directory as your application on the other computers. You can find these assemblies in th
e C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Assemblies\Current folder.

Hope this helps.

- Elton
0 Kudos
Message 4 of 23
(6,935 Views)
Hello again,

I have created a setup project for the app, the setup detect the dependences that I'm using. Then I generate a .msi file. I execute the msi without problem, but when it is installing files I get an error message: Error 2920, he can't find one source file (I don't known which one).

I can create a setup for an app that don't use MStudio libraries without problem.

This afternoon I will try by just copying the files that i need.

Thanks a lot... Again!

Kiko Llaneras
0 Kudos
Message 5 of 23
(6,935 Views)
THe help topic Distributing Measurement Studio .NET Applications describes all the required assemblies.
If nimetautils.msm is one of the msms that the setup project added, you must add a ProgramFilesFolder entry in the Directory Table. Here is what the documentation states

Any deployment project that contains the nimetautils.msm merge module must include a ProgramFilesFolder entry in the Directory Table. To include this entry in Visual Studio .NET, add a "Program Files Folder" as a Special Folder in the File System view of the deployment project.

I believe adding this item will fix your 2920 error.

Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 6 of 23
(6,935 Views)
My deployment project contains the nimetautils.msm merge module. I create a ProgramFilesFolder but I don't known wich files I have to put into. I try putting in the nimetautils.msm as a file, but I get the same 2920 error.

Thanks, tomorrow I will work on that.

Kiko
0 Kudos
Message 7 of 23
(6,935 Views)
bufff...

I have try to peloy my demo applycations by just copying the files over and copying NationalInstruments.Common.dll, NationalInstruments.UI.dll, NationalInstruments.UI.WindowsForms.dll and all dll files in C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Assemblies\Current folder.

I have 4 demo apps:

1) the first run, but when I push a button I get an exception:
System.DllNotFoundException: System.DllNotFoundException: DLL can't be loaded (Analysis.dll).

2)and 3) the second run without problems.

4) doesn't run. An exception is show:
'System.Runtime.InteropServices.COMException' in system.windows.forms.dll

Aditionl info: Class not registered.

All this examples run without problem in t
he computer where Mstudio is installed.

I know that I am giving too much work for you, but your are been my best info source, Thanks again...

Kiko Llaneras.
0 Kudos
Message 8 of 23
(6,935 Views)
"1) the first run, but when I push a button I get an exception: System.DllNotFoundException: System.DllNotFoundException: DLL can't be loaded (Analysis.dll)."

It sounds like you're also using the Measurement Studio analysis library (NationalInstruments.Analysis.Enterprise.dll, NationalInstruments.Analysis.Professional.dll, or NationalInstruments.Analysis.Standard.dll, depending on which package you have installed). If you're using the analysis library, you will also need to copy Analysis.dll, which you can find at C:\Program Files\National Instruments\MeasurementStudioVS2003\Common\Analysis.dll. Copy this .dll to the same directory as the application and other assemblies that you copied.

"2)and 3) the secon
d run without problems."


Could you please clarify what you mean by "second run without problems?" Does this mean that they run without problems or run the second time you run them?

"4) doesn't run. An exception is show: 'System.Runtime.InteropServices.COMException' in system.windows.forms.dll"

I'm guessing that this exception is unrelated to the Measurement Studio assemblies since this is a COMException and the exception is coming from System.Windows.Forms.dll. Could you please post a stack trace for this exception so that we can see more information about where this exception is originating from? Thanks.

- Elton
0 Kudos
Message 9 of 23
(6,935 Views)
Sorry,

"2)and 3) the second run without problems."

Means:

"2)and 3) both run without problems. These Apps run very well, no problems there"
0 Kudos
Message 10 of 23
(6,934 Views)