MSBuild
Minimal project template:
Targets can be called explicitly (uncommon) with the CallTarget task
<CallTarget Target="TargetA;TargetB" />
Targets can have dependencies
<Target Name="TargetC" DependsOnTargets="TargetA;TargetB" />
Invoking TargetC will then be followed by TargetB
<Target Name="TargetB" AfterTargets="TargetC" />
Invoking TargetC will then be preceded by TargetA
<Target Name="TargetA" BeforeTargets="TargetC" />
Conditional invocation
Typically .proj imports .targets, and .targets imports .props
Import .tasks where needed
<Import Project="Common.props" />
The mother ship is
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Special targets defined in Microsoft.CSharp.targets
<Target Name="BeforeBuild" />
<Target Name="AfterBuild" />
Generate locale folders (cross join):
Bring in custom task
<UsingTask AssemblyFile="file name" TaskName="task name" />
Custom tasks extend Task (recommended) or at implement ITask.
Consider using inline tasks.
Recursive list of files