takuya-takeuchi / FaceRecognitionDotNet

The world's simplest facial recognition api for .NET on Windows, MacOS and Linux
MIT License
1.27k stars 309 forks source link

System.DllNotFoundException: Unable to load DLL 'DlibDotNetNativeDnn' or one of its dependencies: The specified module could not be found. (0x8007007E) #122

Closed prafull-chaure closed 3 years ago

prafull-chaure commented 4 years ago

I am trying to run my application on two different systems with same configuration(Intel i5 4th generation Windows 10 Pro), but it works perfectly on one system and another system showing below error. Please guide me to resolve.

Error in Main Method - System.TypeInitializationException: The type initializer for 'DlibDotNet.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'DlibDotNetNativeDnn' or one of its dependencies: The specified module could not be found. (0x8007007E) at DlibDotNet.NativeMethods.LossMetric_anet_type_create() at DlibDotNet.NativeMethods..cctor() --- End of inner exception stack trace --- at DlibDotNet.NativeMethods.get_frontal_face_detector() at DlibDotNet.Dlib.GetFrontalFaceDetector() at FaceRecognitionDotNet.FaceRecognition..ctor(String directory)

takuya-takeuchi commented 4 years ago

@prafull-chaure https://github.com/takuya-takeuchi/FaceRecognitionDotNet/wiki/Quickstart

Checkpoint

And what did you use framework? .NET framewrok? .NET core? If .NET framework, libraries are not copied to application directory.

prafull-chaure commented 4 years ago

@takuya-takeuchi Thank you for your response. I'm using .Net core 3.1 and also installed Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019, but still showing same error.

takuya-takeuchi commented 4 years ago

@prafull-chaure Ok. So check the %USERPROFILE%.nuget\packages\dlibdotnet\19.20.0.20200725\runtimes\win-x64\native/ I don't know what exact version of FRDN. So 19.20.0.20200725 is missing. But you could choice lastest. Then, execute https://github.com/lucasg/Dependencies and open DlibDotNetNativeDnn. You can find the missing libraries.

MarioGK commented 2 years ago

Hi i am having the exact same issue, and the Dependencies app is not showing anything missing

image

image