Skip to content

Common.targets doesn't promote TreatWarningsAsErrors to MSBuildTreatWarningsAsErrors #10871

Open
@rainersigwald

Description

Common.targets does respect the "plain property" version of some warning-related settings:

<PropertyGroup>
<MSBuildWarningsAsMessages Condition="'$(MSBuildWarningsAsMessages)'==''">$(NoWarn)</MSBuildWarningsAsMessages>
<MSBuildWarningsAsErrors Condition="'$(MSBuildWarningsAsErrors)'==''">$(WarningsAsErrors)</MSBuildWarningsAsErrors>
<MSBuildWarningsNotAsErrors Condition="'$(MSBuildWarningsNotAsErrors)'==''">$(WarningsNotAsErrors)</MSBuildWarningsNotAsErrors>
</PropertyGroup>

but it doesn't do the broader setting MSBuildTreatWarningsAsErrors in the same way.

This adds to the confusion about which settings to use.

Metadata

Labels

Priority:1Work that is critical for the release, but we could probably ship withouttriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions