Configuring a .NET Client Application

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

In LabVIEW, .NET client applications are LabVIEW projects and VIs that create and manipulate objects defined in .NET assemblies. When an application uses a .NET object, LabVIEW employs a set of default behaviors to determine which version of a particular .NET assembly to reference and which version of the Common Language Runtime (CLR) loads that assembly. However, you can create .NET configuration files to override the default ways that LabVIEW loads and interacts with .NET objects for a specific project or for all projects. You must use a configuration file for each of the following tasks:

Requirements for .NET Configuration Files

A .NET configuration file must meet the following requirements:

  • Corresponds to a specific LabVIEW project, shared library, or stand-alone application
  • Has a name that matches the file it configures followed by the .config extension. For example, the configuration file for MyApp.lvproj must be named MyApp.lvproj.config, the configuration file for MyApp.exe must be named MyApp.exe.config, and so on.
  • Resides in the same directory as the application it configures
    Note  National Instruments strongly recommends that you use .NET objects only in VIs that are members of a LabVIEW project. VIs that are not part of a project can reference only the LabVIEW.exe.config file located in the same directory as LabVIEW.exe.
  • Contains XML content that is specific to its configuration purpose. Refer to the Microsoft Developer Network (MSDN) for information about creating configuration files for setting up remote .NET access, setting logging options, and setting security.

Building Applications from Configured Projects

When you build a stand-alone application from a LabVIEW project that uses a .NET configuration file, the resulting application also requires a copy of the configuration file. To meet the configuration file requirements, the configuration file for the stand-alone application must reflect the name of the application, and the two files must be located in the same directory.

Note  Refer to Distributing .NET Assemblies with .NET Client Applications for more information about distributing configuration files.

WAS THIS ARTICLE HELPFUL?

Not Helpful