title: MSBuild Publish Web site project to FileSystem doesn't copy dlls from referenced projects
body: <h3>Context</h3>
  <p>In VS2012 I have 1 sln file with several projects under it. Some are just code libraries and others are web applications. And then we also have 1 web site project...</p>
  <p>This web site project was recently updated to .NET 4.0 which also meant that we needed to update the wdproj that our build server uses. I tried this but alas, the build kept on failing.<br />
  I decided to get rid of the wdproj and use the newer Publish profiles. Which was very easy to generate in VS2012.<br />
  On the build server I used the following command:</p>
  <pre><code>&lt;MSBuild Projects=&quot;&lt;path to publishproj file&gt;&quot; Properties=&quot;DeployOnBuild=true; 
      PublishProfile=name-of-profile; VisualStudioVersion=11.0&quot; /&gt;
  </code></pre>
  <p>In the PublishProfile, the WebPublishMethod is FileSystem so it just needs to copy everything to a folder.</p>
  <h3>Problem</h3>
  <p>The web site project contains 6 ProjectReferences which get build by msbuild. The resulting folder contains the dll of those projects but is missing all referenced dlls of those projects nor does it copy the satellite assemblies (compiled resource files in subfolders).<br />
  So I'm missing several dlls!</p>
  <p>Does anyone know a solution for this?</p>
  <h3>Info already found</h3>
  <p>I can find several posts which describe the same behaviour but they either don't have a solution or have a suboptimal fix.<br />
  Example: <a href="http://www.gitshah.com/2013/01/msbuild-doesnt-copy-dll-references-from.html" rel="nofollow noreferrer">MSBuild doesn't copy dll references from dependent projects</a><br />
  Similar question: <a href="https://stackoverflow.com/questions/9633408/msbuild-package-via-command-line-not-including-all-my-assemblies">MSBuild Package via Command line not including all my Assemblies</a></p>
  <p>I also started looking into the msbuild process to the specific copy code used in Microsoft.WebSite.Publishing.targets. In the target 'AfterResolveReferences' the dlls of the referenced project are copied but not the depending dlls.</p>
  <p>All help is much appreciated!</p>