LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET DLL run Location in EXE

Hi, I am running an executable using a .NET driver for a motor controller. It works great in Labview Dev Environment. It pulls the dll from: C:\Program Files\Optec\HSFW\Custom Driver Tools\OPtecHID_FilterWheelAPI.dll When I run the EXE, it tries to use the dll that is in the data directory of the build folder, which doesn't work. I deleted the copy of the dll in the data directory. When I run the EXE, it asks for the location of the file, and when I point to the correct file, it works (mostly). Why is the EXE pointing to the copy of the dll instead of the primary dll? I am pretty sure it is a setting that I need to set, but not sure how. Thanks. (Sorry no code, but I can't get it off of the machine I need it from)
0 Kudos
Message 1 of 2
(1,314 Views)

Try a couple of things:

 

First, instead of having the App directory be "C:\Whatever\App" and the data directory be "C:\Whatever\App\Data", just have them BOTH be "C:\Whatever\App".  It's fine to have them in the same folder.

Second, go to the "C:\Program Files\Optec\HSFW\Custom Driver Tools\" directory, and find ALL of the DLLs in that directory, not just the one you reference.  Put them in the "C:\Whatever\App" directory as well. 

 

If that doesn't work, look in the "C:\Program Files\Optec\HSFW\" and "C:\Program Files\Optec\" directories for any more DLLs you can copy into the folder as well.

0 Kudos
Message 2 of 2
(1,274 Views)