Configuring LabVIEW to Generate .NET 2.0 Interop Assemblies

Updated Nov 15, 2019

Reported In

Software

  • LabVIEW

Issue Details

I want to generate an interop assembly that targets .NET 2.0, but starting with LabVIEW 2013, LabVIEW generates interop assemblies targeted to .NET 4.0 by default. How do I configure LabVIEW to generate interop assemblies that target .NET 2.0?
 

Solution

Complete the following steps to configure LabVIEW to generate interop assemblies that target .NET 2.0:
  1. Open C:\Program Files (x86)\National Instruments\LabVIEW 201X\LabVIEW.ini as a text file. If LabVIEW.ini does not exist, create a new text file in the LabVIEW directory and save it with the name LabVIEW.ini.
  2. Enter GenerateInteropAssemblyDotNetFx20=True on a new line.
  3. Save and close the file. Restart LabVIEW for the new configuration to take effect.
LabVIEW can now generate interop assemblies that target .Net 2.0.