LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with leap

Solved!
Go to solution
I am getting the following error while trying to run the .exe of my program using leap sensor. My VI works perfectly fine. The problem is with the .exe only. looking forward for solutions. %% Error 1172 occurred at Constructor Node Error creating instance of Controller in assembly Leap.Controller, LeapCSharp.NET3.5, Version=0.0.0.0, Culture=neutral, PublicKeyToken=6e1b1368e71eba9b, (System.TypeInitializationException: The type initializer for 'Leap.LeapPINVOKE' threw an exception. Inner Exception: System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. Inner Exception: System.DllNotFoundException: Unable to load DLL 'LeapCSharp': The specified module could not be found. (Exception from HRESULT: 0x8007007E)) Possible reason(s): LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation. System.DllNotFoundException in LMH-Leap.lvlib:Open.vi->test.vi %%
0 Kudos
Message 1 of 5
(2,637 Views)

"DllNotFoundException"

It sounds like you're using a bad path to your DLL or forgot to include it in the "always include" in the build.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(2,584 Views)
Solution
Accepted by kashifsherwani

Try putting the dll in the same folder as the exe.

0 Kudos
Message 3 of 5
(2,556 Views)

Two quick questions:

1) is this on the same PC as the dev system?  This is asked to understand if everything works on one PC or if the deployment is where things break.  It'll help narrow down whether it's failing to install required things on one PC or if it's likely to be a pathing issue.

 

2) Your post mentions .NET.  Have you added your DLLs to the Global Assembly Cache following MS's best practices?  If not, try this step first and see if the error goes away.

0 Kudos
Message 4 of 5
(2,538 Views)

thankyou all, 

finallly I got the solution, I copied all the .dll in the build folder manually and .exe works fine. I didnt know why these dll are not included automatically while building the exe though all the dll are there in the project.

 

 

0 Kudos
Message 5 of 5
(2,517 Views)