From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing LV packed library (lvlibp) dependency when calling .NET interop assembly (dll)

Hi,

 

I'd like to use my LV application from .NET. To do that I use the .NET interop assembly (dll) export by LV. My LV application uses LV packed libraries (lvlibp), which seems to cause the problem of .NET not findig the packed library.

 

I attach an example LV project and the corresponding DLL file plus a Visual Studio project (.NET).

 

The dependencies in this toy project are as follows:

SimpleTestClass.lvclass.increment.vi calls PackLibrary.lvlibp:PackLibraryClass.lvclass.increment.vi.

The DLL is generated to wrap SimpleTestClass.lvclass.increment.vi. The error occurs when I try to instantiate SimpleTestClass in .NET. The error says that the PackLibrary.lvlibp:PackLibraryClass.lvclass.increment.vi cannot be found.

 

Any ideas?

 
.NET project dependencies:

 

dll lvlibp dependencies.png

 

Error thrown in Visual Studio:

dll lvlibp error.png

0 Kudos
Message 1 of 2
(3,146 Views)

Let me answer my own question 🙂

 

It turns out that the packed library file (lvlibp) must be placed next to the EXE file (and not next to the DLL!) generated by .NET.

 

By the way, there is a small error in the attached projects as member VIs are not saved correctly.

 

Peter

0 Kudos
Message 2 of 2
(3,068 Views)