I have a normal SLN file, and I\'m compiling it fine with msbuild from the command line. I do this:
C:\\slndir> msbuild /p:OutDir=C:\\slnbin\\
And it dumps every
Like John Saunders said, you need to have a master MSBuild file that handles the process.
Here is a sample using MSBuild Community Tasks : GetSolutionProjects that gets the projects for a given solution
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<!-- Specify here, the solution you want to compile-->
<ItemGroup>
<Solution Include="C:\slndir\solution.sln"/>
</ItemGroup>
<PropertyGroup>
<Platform>AnyCPU</Platform>
<Configuration>Debug</Configuration>
<!-- Your deployment directory -->
<DeployDir>C:\slbin\Deploy</DeployDir>
</PropertyGroup>
<!-- Gets the projects composing the specified solution -->
<Target Name="GetProjectsFromSolution">
<GetSolutionProjects Solution="%(Solution.Fullpath)">
<Output ItemName="ProjectFiles" TaskParameter="Output"/>
</GetSolutionProjects>
</Target>
<Target Name="CompileProject" DependsOnTargets="GetProjectsFromSolution">
<!--
Foreach project files
Call MSBuild Build Target specifying the outputDir with the project filename.
-->
<MSBuild Projects="%(ProjectFiles.Fullpath)"
Properties="Platform=$(Platform);
Configuration=$(Configuration);
OutDir=$(DeployDir)\%(ProjectFiles.Filename)\"
Targets="Build">
</MSBuild>
</Target>
</Project>
You'll have to do this "by hand". Create a master MSBUILD project file that builds the solution, then copies all the solution outputs where it wants them. This is (roughly) how Visual Studio Team Build does it.