Debugging Calls to .NET Framework Assemblies

.NET objects can exhibit unexpected behavior when LabVIEW has a different version of the assembly in memory than the version you want to use. To diagnose many of these .NET assembly conflicts, use the .NET Assemblies in Memory dialog box.

Note The following content applies to .NET Framework only.

The .NET Assembies in Memory dialog box displays identifying information for the assemblies in memory. As a result, it allows you to verify if LabVIEW loaded the correct version of an assembly.

To debug a call to a .NET Framework assembly, complete the following steps.

  1. Determine the name, version number, and location on disk of the assembly you want LabVIEW to load.
    Ensure that the assembly is located within the search path that LabVIEW uses to locate assemblies.
  2. Select View » .NET Assemblies in Memory.
    The .NET Assemblies in Memory dialog box appears.
  3. In the dialog box, locate the name of the assembly that you are trying to load.
  4. Identify discrepancies between the assembly information in the dialog box and the identifying information of the desired assembly from step 1 . If there are no discrepancies but LabVIEW does not reflect your most recent changes to the assembly, you might need to force LabVIEW to load the updated assembly. For more information, refer to Loading Changes to a .NET Framework Assembly in Memory.
  5. Choose one of the following procedures for replacing the assembly in memory with the desired assembly.
    OptionDescription
    Search for a different version of the same assembly Move the loaded assembly out of the assembly search path. For information about the search path, refer to How LabVIEW Locates .NET Framework Assemblies.
    Force LabVIEW to load the desired version of the assembly Create a project configuration file. For more information, refer to Specifying Which Version of a .NET Assembly to Load.
  6. Close and reopen the projects that call the assembly.
    This action forces LabVIEW to unload the incorrect version of the assembly from memory and then to load the correct version.
Note If the VI that loaded the incorrect assembly is not part of a project, you must restart LabVIEW to clear the incorrect assembly from memory. NI strongly recommends that you use .NET objects only in LabVIEW projects.