Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How LabVIEW Locates .NET Assemblies

Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 8.5
Primary Software Fixed Version: N/A
Secondary Software: N/A

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

Solution:
.NET requires that all assemblies either live in the GAC or in the same directory or sub-directory of the application that's using those assemblies.

LabVIEW 8.0 and later meets 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.

Related Links:
Manual: Using .NET with LabVIEW8.5
MSDN: How the Runtime Locates Assemblies
MSDN: Application Domains

Attachments:





Report Date: 02/18/2008
Last Updated: 02/19/2008
Document ID: 4IH72U6S

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit