title: C# sudden DllNotFoundException
body: <p>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... <br>
  Code of the include:</p>
  
  <pre><code>[DllImport(@"D:\abc\xyz\zyx\x64\Debug\Controll.dll", CallingConvention = CallingConvention.Cdecl)]
  [return: MarshalAs(UnmanagedType.I4)]
      public static extern int startBLEScan();
  </code></pre>
  
  <p>Output while compiling the C++ Dll:</p>
  
  <pre><code>1&gt;Controll.vcxproj -&gt; D:\abc\xyz\zyx\x64\Debug\Controll.dll
  1&gt;Done building project "Controll.vcxproj".
  ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
  </code></pre>
  
  <p>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...
  <br>
  Any suggestions?
  <br>
  EDIT: Full Error Message:
  <br></p>
  
  <pre><code>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.
  </code></pre>