Project Reference Missing After Upgrading .Net​ Class Library

Updated Jan 8, 2019

Reported In

Software

  • Measurement Studio Standard

Driver

  • NI-Sync
  • NI-RFSG
  • NI-TClk

Other

  • Microsoft Visual Studio

Issue Details

I have a .NET application that references NI's .NET class libraries. I recently upgraded to the latest version of the NI .NET driver and find that when I open my project, Microsoft Visual Studio cannot find the assemblies. Where are the assemblies now located, and how do I avoid this in the future?

Solution

In previous versions of the .NET class library drivers, the drivers were installed in the following two folders (not including the Global Assembly Cache(GAC)):
  • Measurement Studio Folder: C:\Program Files (x86)\National Instruments\MeasurementStudioVS <version>DotNET\Assemblies\
  • IVI folder: C:\Program Files (x86)\IVI Foundation\IVI\Microsoft.NET\Framework32\<.NET framework version>\
However, as of September 2016 (versions 16.0 or higher), all .NET class libraries will be installed only in the IVI folder for IVI compliance. As a result, any .NET project that references the older Measurement Studio folder will need to be updated to point to the IVI folder instead. When updating the reference, be sure to refer to the assembly by name. Refer the following figure for an example reference that needs to be updated.
 

In addition to changing the directories, the names were also changed for IVI compliance: 
  1. Renaming assemblies to *.FxXX.dll to include the target framework within the name of the assembly.
  2. Removing the target framework assembly version from the file version.

For example, the NI-TClk .NET assembly would appear in Microsoft Visual Studio's Add/Remove References dialog as National Instruments Modular Instruments TClock Library. Notice how the assembly name contains spaces. Now the name appears the same as the library name i.e. NationalInstruments.ModularInstruments.TClock.FxXX

 

Additional Information

An upgrade will not affect existing applications that were built with an older version of the driver. NI installs a publisher policy file that redirects applications to the latest version of the driver. The older assemblies will still be in the GAC, so a .NET application that was built with a specific version of an NI Modular Instrument .NET driver will still run with those assemblies.