Compartilhar via


MSBuild Tasks Specific to Visual C++

Tasks provide the code that runs during the build process. When Visual C++ is installed, the following tasks are available, in addition to those that are installed with MSBuild. For more information, see MSBuild (Visual C++) Overview.

In addition to the parameters for each task, every task also has the following parameters.

Parameter

Description

Condition

Optional String parameter.

A Boolean expression that the MSBuild engine uses to determine whether this task will be executed. For information about the conditions that are supported by MSBuild, see MSBuild Conditions.

ContinueOnError

Optional parameter. Can contain one of the following values:

  • WarnAndContinue or true. When a task fails, subsequent tasks in the Target element and the build continue to execute, and all errors from the task are treated as warnings

  • ErrorAndContinue. When a task fails, subsequent tasks in the Target element and the build continue to execute, and all errors from the task are treated as errors.

  • ErrorAndStop or false (default). When a task fails, the remaining tasks in theTarget element and the build aren't executed, and the entire Target element and the build are considered to have failed.

Versions of the .NET Framework before 4.5 supported only the true and false values.

For more information, see How to: Ignore Errors in Tasks.

Title

Description

BscMake Task

Wraps the Microsoft Browse Information Maintenance Utility tool (bscmake.exe).

CL Task

Wraps the Visual C++ compiler tool (cl.exe).

CPPClean Task

Deletes the temporary files that MSBuild creates when a Visual C++ project is built.

LIB Task

Wraps the Microsoft 32-Bit Library Manager tool (lib.exe).

Link Task

Wraps the Visual C++ linker tool (link.exe).

MIDL Task

Wraps the Microsoft Interface Definition Language (MIDL) compiler tool (midl.exe).

MT Task

Wraps the Microsoft Manifest Tool (mt.exe).

RC Task

Wraps the Microsoft Windows Resource Compiler tool (rc.exe).

SetEnv Task

Sets or deletes the value of a specified environment variable.

VCMessage Task

Logs warning messages and error messages during a build.

XDCMake Task

Wraps the XML Documentation tool (xdcmake.exe), which merges XML document comment (.xdc) files into an .xml file.

XSD Task

Wraps the XML Schema Definition tool (xsd.exe), which generates schema or class files from a source.

MSBuild Reference

Describes the elements of the MSBuild system.

MSBuild Tasks

Describes tasks, which are units of code that can be combined to produce a build.

Task Writing

Describes how to create a task.