Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Studio libraries are not deploying with VS C# application?

Hi there,

 

I am trying to deploy a Visual Studio C# application with Measurement Studio for use on PCs that do not have Visual Studio or National Instruments software.  My application build and runs without any errors or warnings on my own PC.  It also deploys and runs on other PCs if I remove all National Instrument objects, references, libraries, etc.  However, if I include even one statement in my program, "using NationalInstruments;" (which then necessitates a reference to NationaInstruments.Common) it runs fine on my PC but when deployed gives the following error on the install:  "Unable to install or run the application.  The application requires that assembly NationalInstruments.Common.Native Version 8.7.35.131 be installed in the Global Assembly Cache (GAC) first.  Please contact your system administrator."

 

Adding an explicit reference to NationalInstruments.Common.Native Version 8.7.35.131 does not change anything.

 

Can someone point me to the page in the Measurement Studio manual that I am missing?  I am still pretty new at this C# approach.  Thanks in advance.  

 

Penny

 

0 Kudos
Message 1 of 10
(6,047 Views)

Penny,

 

Take a look at this KnowledgeBase article: http://digital.ni.com/public.nsf/allkb/ED87C183E056CAC386256DF1004E54C6 The Measurement Studio Help also has a section under Contents called  Deploying Measurement Studio Applications which goes indepth into how to deploy Measurement Studio libraries. Let me know if you run into any problems. 

Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 2 of 10
(6,026 Views)

Richard,

Thanks, I will take a look.

Best regards,

Penny

 

0 Kudos
Message 3 of 10
(6,020 Views)

The NationalInstruments.Common.** assemblies need to be in the GAC.  I would suggest creating a VS setup project that targets your C# project so that it will pull in the appropriate merge modules.  This way you won't need to worry about where assemblies go as the installer will take care of that.

 

 

Jonathan N.
National Instruments
Message 4 of 10
(5,987 Views)

Hi Jonathan and Richard,

Thanks, I did get it working with a separate installer project.  It detected all of the NI dependencies for my C# project automatically.   Thanks again for all the great help on these boards!

Best regards,

Penny

 

0 Kudos
Message 5 of 10
(5,980 Views)

There seems to exist a trick, how applications with Measurement Studio can be installed with click once. I tried this with an older version of Measurement Studio (8.5) and Visual Studio 2008 and this worked without problems.... On one computer. If i compile the project on another computer, deployment doesn't work with the knowm GAC error message.

Does anyone has a hint ?

Please NI make Measurement Studio work with ClickOnce. It seems to work principally. Come on.

0 Kudos
Message 6 of 10
(5,186 Views)

 

Jurgen,

 

Please take a look at this KnowledgeBase below. As you can see, ClickOnce actually does not allow the installation of the GAC, and therefore cannot use the Measurement Studio/driver assemblies for the components.

 

Using ClickOnce Deployment with Measurement Studio

http://digital.ni.com/public.nsf/allkb/148A815DF9379F8786257560005DB06A?OpenDocument

 

For more information, please refer to the tutorials to see how to deploy your Measurement Studio applications. It does not look like ClickOnce will be supported with Measurment Studio in the forseeable future.

 

Regards,

Renée M
Applications Engineer
National Instruments
0 Kudos
Message 7 of 10
(5,175 Views)

Renée,

 

thank you for your answer. I read all the articles concerning ClickOnce in this forum.

 

Once again. I have a ClickOnce installation with Measurement Studio components, that works without beeing installed in the GAC.

 

I understand, that drivers, that access hardware compoments, cannot used with ClickOnce. But libraries which are used only for visualisation should have no problem.

 

Regards

 

Juergen

0 Kudos
Message 8 of 10
(5,166 Views)

Hi Jurgen,

 

ClickOnce is unfortunately not supported with Measurement Studio. I would suggest creating a Visual Studio project and using the appropriate merge modules so that you no longer get the GAC error message (http://digital.ni.com/public.nsf/allkb/ED87C183E056CAC386256DF1004E54C6?OpenDocument).

 

Regards,

 

Michael Miracle

NI Americas | AE

NI.com/support | 1866-275-6964

0 Kudos
Message 9 of 10
(5,119 Views)

National Instruments does not support ClickOnce because it does not provide a simple way for our customers to package their components. The main features that ClickOnce does not support that makes distributing Measurement Studio applications difficult are GAC installation, limited registry access, installation of shared files, and merge module support. It is possible to use ClickOnce, but we do not provide instructions or support information on how to do so. You can use the information available in the XCOPY Deployment help topic in the Measurement Studio Help as a guide for what files will need to be included. Note that in addition to the assemblies you are using, there are many underlying dependencies that are required. There are also special instructions for NationalInstruments.Common.dll.

National Instruments
0 Kudos
Message 10 of 10
(5,115 Views)