Condividi tramite


MSBuild Task Reference

Tasks provide the code that runs during the build process. The tasks in the following list are included with MSBuild. When Visual C++ is installed, additional tasks are available that are used to build Visual C++ projects. For more information, see MSBuild Tasks Specific to Visual C++.

In addition to the parameters listed in the topics in this section, each 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 the Target element and the build aren't executed, and the entire Target element and the build is 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.

In This Section

See Also

Concepts

Task Writing

MSBuild Tasks

Other Resources

MSBuild Reference