title: How to correctly reference a dll in Visual Studio 2010?
body: <p>I have a solution that contains a C++ DLL project, and a C# project that will use this DLL (by using PInvoke).</p>
  
  <p>The dll is being built to the <code>x64/Release</code> folder in my solution folder, which makes sense, because that way the C# project doesn't have to poke into the DLL project's folders.</p>
  
  <p>I wonder what would be the correct way to reference it now though. Right now, the DLL project is a dependency of the C# project. My intuition told me that that should have been enough, but the C# project says it cannot find the DLL.</p>
  
  <p>Should I just add the <code>.dll</code> file as a reference too? I thought this might work now but break things in the long run when project settings might get changed around.</p>