LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Highlighted

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
(1,196 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
(1,118 Views)