LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem loading .Net dll constructor in built executable

I have a program which talks to an ETPS power supply using the TopConAPI.dll

I made some edits to the UI that didn't relate to this power supply at all (just some cosmetic changes, putting things on different axis on a plot) and now I'm unable to get the built executable to call the dll correctly. I get the following error : Code d1172, Constructor Node System.IO.FileLoadException: Could not load file or assembly 'TcioWrapper.dll' or one of its dependencies. A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) <append><b>System.IO.FileLoadException</b> in TopConTest.vi

 

I've built a really simple example program which just calls the constructor and then closes it again, but I have the same problem. I have tried putting the TopConAPI.dll and the TcioWrapper.dll in the same folder as the exe and also in the \data folder. Nothing seems to work. Does anyone have any idea about why this error is happening? Could it be some sort of antivirus or windows update? The executable I built a couple of days ago still works!

0 Kudos
Message 1 of 3
(139 Views)

I should add that it works in the dev environment

0 Kudos
Message 2 of 3
(122 Views)

I would check two things...

 

First, right-click the DLL in the application folder and check their "Properties" pages.  You might need to unblock the DLL if the location you copied it from was "suspicious", according to Windows:

 

Kyle97330_0-1790265787035.png

 

The other thing I would do is check the sub-dependencies of the "TcioWrapper.dll" file.  It could have its own missing dependencies.  You can use a DLL analysis program like "ILspy" or similar to check on that.

0 Kudos
Message 3 of 3
(107 Views)