MSBuild example

MyBuilder.csproj

<?xml version="1.0" encoding="utf-8"?>
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0" DefaultTargets="Deployment">

<PropertyGroup>
<OutputDir>c:\Output</OutputDir>
</PropertyGroup>

<ItemGroup>
<ProjToBuild Include="MyProj.sln">
<Properties>OutputPath=$(OutputDir);Configuration=Release</Properties>
</ProjToBuild>
</ItemGroup>

<Target Name="Deployment">
<MSBuild Projects="@(ProjToBuild)"/>
</Target>

</Project>

MyBuilder.bat

call "C:\Program Files\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
msbuild MyBuilder.csproj
pause