C# sudden DllNotFoundException

0

I'm working with a selfmade C++ DLL for a while. Methods of the DLL are called in a C# project. Everything worked just fine! After I started the project today I get a System.DllNotFound exception. I don't know why...
Code of the include:

[DllImport(@"D:\abc\xyz\zyx\x64\Debug\Controll.dll", CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I4)]
    public static extern int startBLEScan();

Output while compiling the C++ Dll:

1>Controll.vcxproj -> D:\abc\xyz\zyx\x64\Debug\Controll.dll
1>Done building project "Controll.vcxproj".
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

As you an see, the path is the same. I don't know what causes this error, since i haven't changed the code in any way and this error never occured before...
Any suggestions?
EDIT: Full Error Message:

System.DllNotFoundException
HResult=0x80131524
Message=The DLL "D:\abc\xyz\zyx\x64\Debug\Controll.dll": The given Module couldn't be found. (Exeption HRESULT: 0x8007007E) could not be loaded.
c#
c++
visual-studio
dll
asked on Stack Overflow Apr 10, 2018 by simonxyzxyz • edited Apr 10, 2018 by simonxyzxyz

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0