<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="HelloWorld">
<Message Text="Hello World!" />
</Target>
</Project>
msbuild myproject.msproj /target:HelloWorld
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AppServer>\\app.server</AppServer>
<WebServer>\\web.server</WebServer>
</PropertyGroup>
</Project>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AppServer>\\app.server</AppServer>
</PropertyGroup>
<PropertyGroup>
<WebServer>\\web.server</WebServer>
</PropertyGroup>
</Project>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<HelloMessage>Hello World!</HelloMessage>
</PropertyGroup>
<Target Name="HelloWorld">
<Message Text="$(HelloMessage)" />
</Target>
</Project>
msbuild myproject.msproj /t:HelloWorld
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<SolutionFile Include="..\MySolution.sln" />
<Compile Include="Program.cs;Properties\AssemblyInfo.cs" />
<Compile Include="MainForm.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon> <!-- File nesting -->
</Compile>
</ItemGroup>
<Target Name="PrintInfo">
<Message Text="SolutionFile: @(SolutionFile)" />
<Message Text="Files to Compile: @(Compile)" /> <!-- Program.cs;Properties\AssemblyInfo.cs;MainForm.cs;MainForm.Designer.cs -->
</Target>
</Project>
<Project DefaultTargets="PrintMetadata" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Include="MyClass.cs" />
</ItemGroup>
<Target Name="PrintMetadata">
<Message Text="%40(Compile->'%25(FullPath)')" />
</Target>
</Project>
<Project DefaultTargets="PrintContent" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="$(Configuration) == ''"> <!-- set only when not already set -->>
<Configuration>Release</Configuration>
</PropertyGroup>
<ItemGroup>
<Content Include="script.js" />
<Content Include="script.debug.js" Condition="$(Configuration) == 'Debug'" />
</ItemGroup>
<Target Name="PrintContent">
<Message Text="Configuration: $(Configuration)" />
<Mesage Text="Content: @(Content)" /> <!-- script.js -->
</Target>
</Project>