How LabVIEW Locates .NET Assemblies

Updated Jan 11, 2018

Reported In

Software

  • LabVIEW 2017 Full
  • LabVIEW 8.0.1 Base
  • LabVIEW 7.0 Full

Issue Details

Where should I place my .NET assemblies so LabVIEW can locate them?

Solution

.NET requires that all assemblies either live in the Global Assembly Cache (GAC) or in the same directory or sub-directory of the application that's using those assemblies.
LabVIEW 8.0 and later meet these requirements by looking for .NET assemblies in the following locations:
  • Global Assembly Cache (GAC) - LabVIEW can access all assemblies in the GAC.
  • Specified subdirectories - If the VI is part of a LabVIEW project, LabVIEW searches the directory that contains the project and all subdirectories of that project. If the VI is not part of a LabVIEW project, LabVIEW searches the LabVIEW.exe directory. If you are using .NET assemblies in a shared library or stand-alone application, LabVIEW searches the directory that contains the library or application and the data and bin subdirectories.
  • Relative path - LabVIEW stores the relative path to the .NET assembly inside the VI (for non-GAC assemblies) and thus LabVIEW uses this path to search as well.
LabVIEW 7.x met these requirements by looking for .NET assemblies in the following locations:
  • Root directory of the top-level VI
  • Global Assembly Cache (GAC)

Note: National Instruments strongly recommends that you always put VIs that use .NET assemblies in a LabVIEW project and not leave them as stand-alone VIs.

For more information about using LabVIEW with .NET, refer to the Using .NET with LabVIEW help topic in the LabVIEW Help.

WAS THIS ARTICLE HELPFUL?

Not Helpful