title: Visual Studio DLL References - Using Relative Paths And $(ConfigurationName) To Select The Corresponding DLL?
body: <p>I have 2 separate Visual Studio C# solutions. One solution contains projects that generate DLL files (class library projects) and the other solution contains projects that depend on the DLL files from the other solution.</p>
  
  <p>I have two questions about adding the DLL files from the first solution as references to each of the projects in the second solution.</p>
  
  <ol>
  <li><p>When I add the DLL files as references (using the Browse option) is
  there a way to use relative directories so that if I move the
  solutions to a different folder I won't have to update the
  references? (Assuming the two solutions are always in the same
  location relative to one another.) </p>
  
  <p>For example: ....\Solution1\Project1\bin\Debug\Project1.dll</p></li>
  <li><p>If I change the DLL solution's configuration from Release to Debug I
  want the other solution projects to reference the DLLs in the Debug
  folder and vice versa. When adding the DLL files to each project can
  I use something like the Visual Studio macro $(ConfigurationName) in
  the DLL file path so that, depending on whether I build in Debug or
  Release mode, I use the correct DLL file? </p>
  
  <p>For example:
  ....\Solution1\Project1\bin\$(ConfigurationName)\Project1.dll</p></li>
  </ol>
  
  <p>Thank you.</p>