Using ClickOnce Deployment with Measurement Studio

Updated Dec 10, 2018

Reported In


  • Measurement Studio

Programming Language

  • C# .NET

Issue Details

I am using Microsoft's ClickOnce Deployment (Publish Wizard) to deploy my application built in Visual Studio using Measurement Studio components. However, when installing the application on the client computer, an error message appears saying that a Measurement Studio Component (NationalInstruments.UI, NationalInstruments.Analysis, etc.) should be installed in the GAC. How can I fix this?
​​​​​Unable to install or run the application. The application requires that assembly NationalInstruments.NiLmClientDLL Version be installed in the Global Assembly Cache (GAC) first. Please contact your system administrator.


ClickOnce deployment is not supported with Measurement Studio or any National Instruments .NET components, including any NI drivers. ClickOnce deployment does not allow installation to the Global Assembly Cache (GAC), so it can not move over the necessary Measurement Studio and driver assemblies needed to use these components.

For more information on distributing Measurement Studio applications using supported distribution methods, see Distributing Measurement Studio Applications in Microsoft Visual Studio 2010 and Earlier.

As a workaround, if you need to use ClickOnce, you can create an additional bootstrap installer using External Link: Windows Installer to install the necessary libraries to the GAC.

Note: If you can not change distribution methods and you would like this feature to be added to future versions of Measurement Studio, you can provide feedback to R&D by filing a product suggestion using the NI Idea Exchange.