title: Build a project with relative path to dll
body: <p>I have created a c# project in it I reference system.windows.interactivity.dll.<br/>
  What I'm wondering is how to set the project up so that when I build the *.exe I get this sort of structure:</p>
  
  <pre><code>Program Folder
      program.exe
  Libraries Folder
      system.windows.interactivity.dll
  </code></pre>
  
  <p>I have tried a little bit of experimentation by placing a "Libraries" folder under the solution folder, so that it is at the same level as the project folder. This gives a relative path in the csproj file of "..\Libraries\system.windows.interactivity.dll", however this cannot be the solution as when I compile it copies the dll into the debug folder with the exe and it keeps this 'same level' path structure.</p>
  
  <p>How can I alter things so that it places and references the dll in another directory?</p>
  
  <p><strong>[Update]</strong><br/>
  So I have modified the following in my project:<br/>
  1: Changed the 'Copy Local' property on reference system.windows.interactivity.dll to False.<br/>
  2: Added the following code to the csproj file to check if the Libraries folder exists above the Output directory, if not create and then copy over the dll.</p>
  
  <pre><code>  &lt;Target Name="BeforeBuild"&gt;
      &lt;MakeDir Directories="$(OutDir)..\Libraries" 
               Condition="!Exists('$(OutDir)..\Libraries')" /&gt;
      &lt;Copy SourceFiles="..\Libraries\System.Windows.Interactivity.dll" 
            DestinationFolder="$(OutDir)..\Libraries" 
            ContinueOnError="True" /&gt;
    &lt;/Target&gt;
  </code></pre>
  
  <p>3. Add the following code to App.config to add another location for the app to search for the dll.</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;runtime&gt;
        &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
          &lt;probing privatePath="..\Libraries"/&gt;
        &lt;/assemblyBinding&gt;
      &lt;/runtime&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>My Findings:<br/>
  Upon building the app, all files are exactly where I want them, as in the structure in my original post. When I try to run the exe from the output directory it cannot find the dll.</p>
  
  <p><strong>[/Update]</strong></p>