Configuring a .NET Framework Client Application with Configuration Files
- Updated2026-08-28
- 2 minute(s) read
Configuring a .NET Framework Client Application with Configuration Files
You can use .NET configuration files to override certain default behaviors for .NET Framework client applications in LabVIEW. Certain operations, like some debugging tasks or loading a specific version of an assembly, require a .NET configuration file.
In LabVIEW, .NET Framework client applications are LabVIEW projects and VIs that create and manipulate objects defined in .NET Framework assemblies.
When an application uses a .NET Framework object, LabVIEW employs a set of default behaviors to determine which version of a particular .NET Framework 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:
- Debugging some assembly calls
- Loading .NET Framework 2.0 assemblies
- Loading a specific version of an assembly
- Setting up remote .NET Framework access
- Setting logging options
- Setting security preferences
To correctly configure a .NET Framework configuration file for a client application, complete the following steps.
-
Ensure the .NET Framework configuration file meets all of 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
configuresNote NI strongly recommends that you use .NET Framework 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 Microsoft Learn for information about creating configuration files for setting up remote .NET Framework access, setting logging options, and setting security.
-
If you build a stand-alone application from a LabVIEW project that uses a .NET
Framework configuration file, ensure the .NET configuration file also meets the following
requirements:
- The configuration file for the stand-alone application must reflect the name of the application
- The two files—the application and the configuration file—must be located in the same directory
Because the resulting application also requires a copy of the configuration file, the file must meet these requirements in order to satisfy the requirements in step 1.
Note For more information about distributing configuration files, refer to Distributing .NET Assemblies with .NET Client Applications.