08-03-2016 10:01 AM
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?
Error thrown in Visual Studio:
08-08-2016 11:15 AM
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