title: Visual Studio 2008: Use external Debug-DLL for Debug-Run and external Release-DLL for Release-Run
body: <p><strong>Short version:</strong>
  If running a program from VS2008 in Release mode, I want it to use 
  <code>pathA\externaldll.dll</code>.
  If running a program from VS2008 in Debug mode, I want it to use 
  <code>pathB\externaldll.dll</code></p>
  
  <p><strong>Long version:</strong>
  I have a programm that is linked against external dll-files (VTK). I have built the external application myself in both Debug and Release mode. The external dll-files are located like this:</p>
  
  <pre><code>&lt;some path&gt;\Debug\externalDll.dll
  &lt;some path&gt;\Release\externalDll.dll
  </code></pre>
  
  <p>(so they are called the same, but have different folders).</p>
  
  <p>I want to step into the external code for Debug Builds, but I want the Release Builds to use the Release DLLs for testing the execution time (I process big datasets).</p>
  
  <p>Linking to the according dlls is easy, as I have project settings for that. But when executing, Visual Studio takes the first dll it finds within the PATH environment variable.</p>
  
  <p><strong>Cumbersome solution idea:</strong>
  Having the PATH variable like: PATH=;%CURRENTDLLPATH%;
  and setting CURRENTDLLPATH in a post-build-step.
  Is there no solution built-in into VS2008?</p>