Error 1172: A .NET Exception Occurred in LabVIEW

Updated Sep 10, 2026

Reported In

Software

  • LabVIEW

Issue Details

  • I am calling a .NET assembly from LabVIEW and receive Error 1172 when accessing a .NET property or method.
  • How can I identify and troubleshoot the underlying .NET exception?
Error 1172 occurred at an unidentified location.

Possible reason(s):

LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold) and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.

Solution

LabVIEW reports Error 1172 when a called .NET property or method throws an exception. Error 1172 is a generic error code; use the accompanying .NET exception message to identify the underlying cause.

This article explains how to:
  1. Obtain the complete .NET exception message.
  2. Troubleshoot the error in order to resolve it.


Obtaining the .NET Exception Message

In LabVIEW 8.0 and Later

In LabVIEW 8.0 and later, more information was added to the error messages by placing the .NET exception message property into the Source string of the Error Cluster.

This exception message can only be accessed when implementing manual error handling. Within the error handling, the Source element of the Error Cluster can be unbundled to reveal additional error information. For more information about error handling, refer to Handling Errors in LabVIEW.
 

In LabVIEW 7.x and Earlier

Additional information about the .NET exception is not available in LabVIEW 7.x and earlier. Continue to the troubleshooting steps below.

Troubleshooting the .NET Error

  • Ensure that LabVIEW can locate the .NET assembly and its dependencies. Refer to How LabVIEW Locates .NET Assemblies for supported locations and deployment considerations.
    • For standalone VIs outside a LabVIEW project, save the assembly in the same directory as LabVIEW.exe, typically C:\Program Files (x86)\National Instruments\LabVIEW 20xx, where 20xx represents the LabVIEW version.
    • For a VI in a LabVIEW project, place the assembly and its dependencies in the project directory or an applicable subdirectory.
    • For a LabVIEW-built application, distribute the assemblies generated by Application Builder with the application, including the applicable data subdirectory.
  • For .NET Framework assemblies, install shared assemblies, including assemblies accessed from a network location, in the Global Assembly Cache (GAC), when appropriate. Refer to How to: Install an assembly into the global assembly cache for further details.
  • In LabVIEW 7.x, add the .NET assembly as a reference in LabVIEW by selecting Tools >> Advanced >> NET Assembly References. Select Add and navigate to the location of the assemblies that are called.
  • If the error occurs in a LabVIEW-built application, confirm that the target computer has the .NET Framework version required by the assembly. Use the (External) How to: Determine which .NET Framework versions are installed to confirm your .NET Framework version. If the required version is not installed, obtain it from (External) Download .NET Framework.
  • Use the Probe Tool to confirm that the .NET object reference created by the Constructor Node VI is valid.
  • If the complete .NET exception message indicates an assembly binding issue, such as a missing dependency or assembly version mismatch, capture .NET Framework assembly binding logs to determine how the assembly is resolved at runtime. Follow the steps in Capture .NET Framework Assembly Binding Logs in LabVIEW.
  • Use a configuration file to direct the CLR to load a .NET assembly from a specific location or to use a specific assembly version through a binding redirect. Refer to Specify the Path for the .NET Assemblies Called From LabVIEW for instructions.
  • If the exception originates in a third-party .NET assembly:
    • Call the same property or method from another compatible .NET application to determine whether the behavior is specific to LabVIEW.
    • If the exception also occurs outside LabVIEW, contact the assembly developer for further assistance.

Additional Information

Error 1172 identifies that LabVIEW received an exception from a called .NET API. It does not identify the specific cause of the exception. Use the exception information available in the Error Cluster, together with the failing node and assembly-loading information, to determine the next troubleshooting action.

 
The assembly-loading and binding-log steps in this article primarily apply to .NET Framework assemblies. The Global Assembly Cache is a .NET Framework mechanism and is not used by modern .NET assemblies.