title: ensuring c# project dependencies are copied to output directory in Visual Studio and TFS
body: <p>I am working on a project which has many dependencies which are developed on a separate team from me. We use TFS 2010. Many of my applications depend on libraries and xml files which are under active development, so I want to keep them up to date. I also don't want to create separate copies of the dll's and xml files for each application/project, but rather source them from their respective locations within the same source control repository. This should be possible using a relative path. 
  I tried putting the following in my .csproj file</p>
  
  <pre><code> &lt;ItemGroup&gt;
       &lt;Dependencies Include="..\..\Driver\Driver.dll"&gt;
        &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;
       &lt;/Dependencies&gt;
   &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>this doesn't work, either on my workstation or on the build server, however, the files show up as dependencies in the Solution Explorer, and it allows me to change the copy to output property and shows the full path the to files, which is valid.</p>
  
  <p>Another thing I tried was just running xcopy as a pre-build event, which works on my local machine but does NOT copy the files to the output/TFS drop folder, so it isn't picking it up as a dependency. </p>