04-10-2010 07:51 PM
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
04-12-2010 09:38 AM
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.
04-12-2010 12:55 PM
Richard,
Thanks, I will take a look.
Best regards,
Penny
04-15-2010 07:45 PM
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.
04-16-2010 07:50 AM
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
01-18-2012 08:00 AM
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.
01-19-2012 01:02 PM
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.
01-20-2012 02:06 AM
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
01-23-2012 11:12 AM
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
01-23-2012 04:19 PM
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.