Context
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...
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.
I decided to get rid of the wdproj and use the newer Publish profiles. Which was very easy to generate in VS2012.
On the build server I used the following command:
<MSBuild Projects="<path to publishproj file>" Properties="DeployOnBuild=true;
PublishProfile=name-of-profile; VisualStudioVersion=11.0" />
In the PublishProfile, the WebPublishMethod is FileSystem so it just needs to copy everything to a folder.
Problem
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).
So I'm missing several dlls!
Does anyone know a solution for this?
Info already found
I can find several posts which describe the same behaviour but they either don't have a solution or have a suboptimal fix.
Example: MSBuild doesn't copy dll references from dependent projects
Similar question: MSBuild Package via Command line not including all my Assemblies
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.
All help is much appreciated!