Targets Mode

This action type for work with MSBuild Targets / Tasks etc. 'as is' (classic compatible mode).

Blank Project

  • v0.12.4+:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <Target Name="Init">
        <!-- ... -->
    </Target>

    <!--
        Additional properties:
            $(ActionName)
            $(BuildType)
            $(EventType)
            $(SupportMSBuild)
            $(SupportSBEScripts)
            $(SolutionActiveCfg)
            $(StartupProject)
    -->
</Project>
  • Obsolete variant:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <!-- ... -->
</Project>

ToolsVersion

Use any available version for you, for example:

  • "12.0", "14.0", "2.0", "3.5", "4.0"

Samples

Use MSDN and feel free…

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

    <Target Name="Init">
        <Error Condition="'$(BuildType)'!='Rebuild'" 
                Text="This action requires 'Rebuild' build type. Current: '$(BuildType)'" />
                
        <CallTarget Targets="_BuildSpec" />
    </Target>
    <Import Project="$(SolutionDir)\stasks.targets" />
    
</Project>

References