LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error "1172" When calling .net assembly

 

Dear Community,

I am working on a program I got from a colleague.

I have a simple init vi referencing a constructor in a dll located in the same path as the vi (the path is under c:). I get Error "1172". I have another vi referencing the same dll but now located in another path (still under c:). That works fine. Now that the other dll is in memory init.vi runs fine. I can not explain this behavior!

 

LabVIEW 2015

Win 7

Microsoft .NET framework 4.7

0 Kudos
Message 1 of 6
(4,151 Views)

Hello,

 

I also had a similar problem, do you mean you get the error "1172 - System.NullReferenceException"?

 

I have a VI referencing different constructors of a DLL. All of the constructors work fine except for the most important one, to get the measurements results . Do you mean that if you move the DLL in a different path on C (i have it on a server) it works for you?

0 Kudos
Message 2 of 6
(4,122 Views)

The error I get is:

Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified.

Ammendment:

using LabVIEW 15, 64 bit.

 

0 Kudos
Message 3 of 6
(4,096 Views)

 Do you mean that if you move the DLL in a different path on C (i have it on a server) it works for you?

When I move the dll to the path (on C) where the calling vi is (init.vi) then I get Error 1172. 

0 Kudos
Message 4 of 6
(4,094 Views)

For me the error is the following:

Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown  by the target of an invocation.
Inner Exception: System.NullReferenceException: The object reference is not set to an instance of an object.

Possible reason (s):

LabVIEW: A .NET exception occurred in an external assembly.

 

...and only for one funtion I call on the DLL and I call, in the same VI, different functions without errors. Wherever I move the DLL, I cannot make this thing work.... I think we have quite similar problem but at least for you it is a small issue as you manage to make the VI working somehow....

0 Kudos
Message 5 of 6
(4,090 Views)

 

Dear fabbro 12,

It is solved!

I moved the two folders that contain furthers dlls needed by the calling dll into the project directory (one path layer above the previous path).

 

 

0 Kudos
Message 6 of 6
(4,080 Views)