How Can I Force LabVIEW to Use a Version of the .NET Framework

Updated Dec 2, 2023

Environment

Software

  • LabVIEW

Programming Language

  • C# .NET

I want to use a .NET assembly in LabVIEW that is designed for use with a particular version of the .NET Framework. I have multiple versions of the .NET Framework installed on my machine. Is there any way to force LabVIEW to use the particular version of the .NET Framework I need?

By default, LabVIEW loads the latest version of the .NET CLR installed on the system, and the assemblies target that version. To force LabVIEW to load a specific version of the .NET Framework, open a text editor and create a configuration file with the following syntax:

<configuration>
<startup>
<requiredRuntime version="vXXXX"/>
</startup>
</configuration>


where XXXX is the version number of the .NET Framework you want LabVIEW to load. For example, to force LabVIEW to load the .NET 1.1 CLR, enter 1.1.4322.  

Save the configuration file as labview.exe.config on your hard drive in the same location as LabVIEW.exe. The next time you launch LabVIEW, you can use .NET assembly designed for use with version 1.1 of the .NET Framework.  Do note that when building an executable from the LabVIEW project, you will have to include a <executable name>.exe.config file next to the executable.

NOTE: .NET 4.0 requires a different .NET configuration file. Refer to the Loading .NET 4.0 Assemblies in LabVIEW topic in the LabVIEW Help for the configuration file as well as specific caveats for using it.