title: Dll import path . how to get dll path which located in other folder
body: <p>My Project1 is here
  \Project1\Bin\Debug\application.exe
  and my dlls are in 
  \Project1\Debug\3rdparty.dll</p>
  
  <p>How to get path that include this dll in my code?</p>
  
  <pre><code>[DllImport("????????/3rdparty.dll")]
  </code></pre>
  
  <p>what should i write at question  marks (?????)
  My solution includes other c++ projects inside. So whenever i compiled c++ project, it refresh dll in project1\Debug (some how i am not familiar with c++)
  I need to use that dlls in DllImport [Path].
  If i tried to add reference, it gives me error. 
  This might be really easy question, but i am not able to solve it for some reason.</p>
  
  <p>Anwered by Hans Pasant in comment section : </p>
  
  <p>Change the Output Directory setting in the C++ project to $(SolutionDir)bin\$(ConfigurationName) so that the native DLL ends up in the same folder as your managed program. Just use [DllImport("3rdparty.dll")] in your C# code. – Hans Passant</p>