LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET assembly and packed project lirary warnings

Hello,

 

I am using packed project liobrary that references WinSCP dll located in 

C:\Program Files(x86)\WinSCP\WinSCP.dll

 

when I build library LabVIEW makes copy of this dll to destination folder of the build.

This is fine for me but then this error is displayed when I open compiled library:

image.png

 

Why this happens?

Is there a way to tell LV to leave this dll in the same place? 

 

 

0 Kudos
Message 1 of 2
(2,607 Views)

That's uncanny! I had exactly the same issue with the same DLL only a few days ago and spent ages trying to figure it out, until I stumbled across the following thread:

https://forums.ni.com/t5/LabVIEW/NET-Assembly-in-Packed-Library-Bizarre-Behavior/td-p/3815758

 

Basically, it's a known bug in LabVIEW (CAR #720595). If the .NET reference is stored in the class's private data it doesn't adjust the links to the PPL DLL.

 

To workaround this, store the reference as a common .NET class (e.g. System.Object) inside the class data and then use accessors to type cast it back to the WinSCP class.

Message 2 of 2
(2,528 Views)