![]() | Download Help (Windows Only) |
![]() | Note: This topic applies to the following Measurement Studio editions: Enterprise and Professional. |
The Measurement Studio NationalInstruments.NetworkVariable class library does not support XCOPY deployment because XCOPY deployment requires some support files to be installed on the machine that runs the application. Because of this, you must deploy applications that use the NationalInstruments.NetworkVariable class libraries in a different way. Refer to the following sections below for information about deploying applications that use the NationalInstruments.NetworkVariable class libraries. In this topic, the phrase target machine means the machine to which you are installing the application.
You can deploy applications that use network variables in two ways, depending on the location of the network variables with respect to the target machine. Client deployment is a deployment scenario where the application uses network variables hosted on another machine. Server deployment is a deployment scenario where the target machine hosts the network variables.
In this scenario, you create an application that accesses variables on an existing server. You need to deploy the client application to other machines that continue to use the existing network variables. For this case, you can use a Microsoft Visual Studio setup project. The Visual Studio setup project automatically detects the dependant merge modules.
In this scenario, you need to deploy the Shared Variable Engine to another machine that acts as the server. To deploy the Shared Variable Engine, you must run a separate installer on the target machine. The required installer is installed with Measurement Studio to the [InstallDir]\ Redist\NINETVARSERV folder.
You can view all command line options for running the installer with setup.exe /?. From the command line options, you can choose to run the installer silently.
You can use Distributed System Manager to create and configure network variables on the server. Distributed System Manager is installed by default. To run the installer without installing the Distributed System Manager, run the setup.exe /prop SYSMANEXCLUDE=1 command. To run the Shared Variable Engine installer silently and without the Distributed System Manager, run the setup.exe /q /acceptlicenses yes /prop SYSMANEXCLUDE=1 command.
There is no supported method to automatically deploy network variables with your application; network variables must be manually created on the target machine. You can create the required variables during deployment by using one of the three different methods: implicitly created variables, network variable classes, or Distributed System Manager.
Implicitly created variables are created when a writer attempts to connect to the variable. Because implicitly created variables need not exist before usage, an application that uses implicitly created variables does not require additional steps to create the variables.
You should use implicitly created variables in the following scenarios:
Refer to the Implicitly Created Variables section in Key Measurement Studio Network Variable .NET Library Features for more information.
You can use ServerProcess, ServerProcessInfo, ServerVariable, and ServerVariableInfo to explicitly create and configure variables on the target machine. If you are performing a server deployment, your application can use these classes to create the network variables as needed, or you can write an application to create the variables as part of the deployment process.
You should use the network variable class libraries to programmatically create network variables in the following scenarios:
Refer to Explicitly Creating Network Variables for more information.
You can use the Distributed System Manager application to create and configure network variables on a machine. Distributed System Manager is installed as part of the server deployment scenario described in the Server Deployment section. Select Start»All Programs»National Instruments»Distributed System Manager to launch the application.
You should use Distributed System Manager to manually create network variables in the following scenarios:
For more information about creating and configuring variables with Distributed System Manager, refer to the Creating, Modifying, or Deleting Shared or Network Variables topic in the NI Distributed System Manager Help. In Distributed System Manager, select Help»System Manager Overview to access the help.
The Deploying Measurement Studio Windows Applications topic contains most of the information required to deploy a Windows Forms application that uses network variables. If you are creating an installer and using the Measurement Studio merge modules to ensure all dependencies are installed, you must include the correct merge modules indicated in the Measurement Studio .NET Merge Modules topic. If the deployment scenario is a server deployment, you must run the Shared Variable Engine installer mentioned in the Server Deployment section.
The Deploying Measurement Studio Web Applications topic includes basic information about deploying Measurement Studio Web Forms applications. However, since the NationalInstruments.NetworkVariable class libraries do not support XCOPY deployment, you must perform some extra steps to ensure your application functions correctly. You may choose to deploy your Web application using XCOPY deployment or the Copy Web Site Tool in Visual Studio, or you may choose to create an installer for your Web application.
If you choose to deploy your Web application using XCOPY or the Copy Web Site Tool, you must ensure that the correct National Instruments assemblies are either copied to the bin directory for the application or installed in the Global Assembly Cache (GAC) on the target machine. One way to ensure your National Instruments assemblies are in the correct place is to use a custom setup project that uses the Measurement Studio merge modules as discussed in Deploying Measurement Studio Windows Applications. Once the merge modules are added to the project, you can re-target them to an appropriate directory.
Complete the following steps to install a Web application that uses the NationalInstruments.NetworkVariable class libraries to the C:\MyApp directory.
You may choose to deploy your application in a single setup project rather than using the approach previously outlined. This example assumes you are using a setup project in the same solution as the project that contains the Web application you want to deploy. To use a single setup project, complete the following steps.
![]() | Note: Building your network variable setup project results in warnings of the following type: Two or more objects have the same target location 'location' . You can continue to use your setup project normally; these warnings do not affect your project, and you can safely ignore them. |
Helpful
Not Helpful