06-15-2018 07:23 AM
Hi,
I have a project which reads from a pressure sensor. This sensor is accessed using .net nodes to read from a dll. It all works well in interpreted mode, but when compiled as an exe the contructor node cannot see the dll. and gives error code 4.
I am told that the dll either needs to be registerd on the GAC, or in the same folder as the vi. How do I do the latter if the vi is embedded in an exe? I tried putting the dll in the same folder as the exe, but no joy.
Re- registering the dll on the GAC. I don't seem to have gacutil on my machine. Is there any other way to do this?
Regards,
Ian
Solved! Go to Solution.
06-15-2018 12:38 PM
It looks like you're on LabVIEW version 2011. Is the DLL from .NET 4.0? If so, you need to create an "Application.exe.config" file as mentioned here for it to see the DLL.
Also, note that LabVIEW can't see DLL dependencies. If the DLL you're using has other DLLs that it calls that aren't in the GAC, they also need to be in the directory with the EXE.
06-18-2018 09:27 AM
I looked at adding the dll path to the GAC, but it seems that the editor is a part of the MS development suite which I don't have, so I gave up on that.
Both the development and test PCs have now been installed with .net version 4.6 only, all other versions having been removed. I then copied the DLLs to the .exe folder, and 'BING!' it all started working.
Thanks for your input.