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
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s