Skip to content

Mention MSBuildWarningsAsMessages #10219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/msbuild/how-to-ignore-errors-in-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ms.subservice: msbuild

Sometimes you want a build to be tolerant of faults in certain tasks. If those non-critical tasks fail, you want the build to continue because it can still produce the required output. For example, if a project uses a `SendMail` task to send an e-mail message after each component is built, you might consider it acceptable for the build to proceed to completion even when the mail servers are unavailable and the status messages cannot be sent. Or, for example, if intermediate files are usually deleted during the build, you might consider it acceptable for the build to proceed to completion even when those files cannot be deleted.

In addition to the methods described here that are specific to tasks, you can also make use of MSBuild's general ways of ignoring warnings, for example, by using the property `MSBuildWarningsAsMessages`. See [Common MSBuild project properties](common-msbuild-project-properties.md).

## Use the ContinueOnError attribute

The `ContinueOnError` attribute of the `Task` element controls whether a build stops or continues when a task failure occurs. This attribute also controls whether errors are treated as errors or warnings when the build continues.
Expand Down