Error -1172 From .NET DLL When Running a LabVIEW Executable

Updated Jun 4, 2019

Reported In

Software

  • LabVIEW

Issue Details

I have an application that uses a .NET DLL and my code works fine in the development environment in LabVIEW but when I build the code into an executable it causes Error -1172 with the message:
Invoke Node Error calling method...
Or the message:
Error 1172 occured at Constructor Node. Error creating instance of <DLL name> in assembly 
Why does it do this and how do I fix it?

Solution

When a .NET driver is called from an executable the DLL and all of the dependencies of the DLL need to be in the same directory as the executable.  If you copy the DLL and it's necessary dependencies into the same folder as the executable, the problem should be fixed. 

You can also include the DLL in the build of the executable.

WAS THIS ARTICLE HELPFUL?

Not Helpful