IT:AD:MSbuild:HowTo:Project Syntax/InitialProjects and DefaultProjects
Notes
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="MyTarget"> ... </Project>
InitialTargets
On the other hand, InitialTargets are always executed, before any DefaultTargets, whether defined in the xml root or via a command line parameter.
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="Clean"> ... </Project>