Skip to content
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

Add MSBuildWarnings(Not)As(Errors/Messages) #7586

Merged
merged 1 commit into from
Mar 2, 2022
Merged
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
3 changes: 3 additions & 0 deletions docs/msbuild/msbuild-reserved-and-well-known-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ The table in this section shows the MSBuild predefined properties. The example c
| `MSBuildExtensionsPath` | Well-known | Introduced in the .NET Framework 4: there is no difference between the default values of `MSBuildExtensionsPath` and `MSBuildExtensionsPath32`. You can set the environment variable `MSBUILDLEGACYEXTENSIONSPATH` to a non-null value to enable the behavior of the default value of `MSBuildExtensionsPath` in earlier versions.<br /><br /> In the .NET Framework 3.5 and earlier, the default value of `MSBuildExtensionsPath` points to the path of the MSBuild subfolder under the *\Program Files\\* or *\Program Files (x86)* folder, depending on the bitness of the current process. For example, for a 32-bit process on a 64-bit machine, this property points to the *\Program Files (x86)* folder. For a 64-bit process on a 64-bit machine, this property points to the *\Program Files* folder.<br /><br /> Do not include the final backslash on this property.<br /><br /> This location is a useful place to put custom target files. For example, your target files could be installed at *\Program Files\MSBuild\MyFiles\Northwind.targets* and then imported in project files by using this XML code:<br /><br /> `<Import Project="$(MSBuildExtensionsPath)\MyFiles\Northwind.targets"/>` | `C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild`|
| `MSBuildExtensionsPath32` | Well-known | The path of the MSBuild subfolder under the *\Program Files* or *\Program Files (x86)* folder. The path always points to the 32-bit *\Program Files (x86)* folder on a 32-bit machine and *\Program Files* on a 64-bit machine.". See also `MSBuildExtensionsPath` and `MSBuildExtensionsPath64`.<br /><br /> Do not include the final backslash on this property. | `C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild`|
| `MSBuildExtensionsPath64` | Well-known | The path of the MSBuild subfolder under the *\Program Files* folder. For a 64-bit machine, this path always points to the *\Program Files* folder. For a 32-bit machine, this path is blank. See also `MSBuildExtensionsPath` and `MSBuildExtensionsPath32`.<br /><br /> Do not include the final backslash on this property. | `C:\Program Files\MSBuild`|
| `MSBuildWarningsAsErrors` | Well-known | A list of warning codes to treat as errors. | `MSB1234;MSB5678`|
| `MSBuildWarningsNotAsErrors` | Well-known | A list of warning codes that should not be promoted to errors even if the `-warnAsError` switch is set to promote all other warnings to errors. Note that it has no effect if that is not true. | `MSB1234;MSB5678`|
| `MSBuildWarningsAsMessages` | Well-known | A list of warning codes to treat as messages. | `MSB1234;MSB5678`|
| `MSBuildInteractive` | Reserved | `true` if MSBuild is running interactively, allowing user input. This setting is controlled by the `-interactive` command-line option. | `false` |
| `MSBuildLastTaskResult` | Reserved | `true` if the previous task completed without any errors (even if there were warnings), or `false` if the previous task had errors. Typically, when an error occurs in a task, the error is the last thing that happens in that project. Therefore, the value of this property is never `false`, except in these scenarios:<br /><br /> - When the `ContinueOnError` attribute of the [Task element (MSBuild)](../msbuild/task-element-msbuild.md) is set to `WarnAndContinue` (or `true`) or `ErrorAndContinue`.<br /><br /> - When the `Target` has an [OnError element (MSBuild)](../msbuild/onerror-element-msbuild.md) as a child element. | `true` |
| `MSBuildNodeCount` | Reserved | The maximum number of concurrent processes that are used when building. This is the value that you specified for **-maxcpucount** on the command line. If you specified **-maxcpucount** without specifying a value, then `MSBuildNodeCount` specifies the number of processors in the computer. For more information, see [Command-line reference](../msbuild/msbuild-command-line-reference.md) and [Build multiple projects in parallel](../msbuild/building-multiple-projects-in-parallel-with-msbuild.md). | 1 |
Expand Down