Skip to content

Commit

Permalink
Support WarningsAsErrors as MSBuildWarningsAsErrors (#5774)
Browse files Browse the repository at this point in the history
In same feature flag as NoWarn (can change to a separate feature flag if desired.)

Addition to #4421.
  • Loading branch information
Forgind authored Oct 30, 2020
1 parent b41ff04 commit 47e6ac1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Tasks/Microsoft.Common.CurrentVersion.targets
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,9 @@ Copyright (C) Microsoft Corporation. All rights reserved.
</PropertyGroup>

<!-- Users familiar with how some other repos work try to use NoWarn with MSBuild in place of MSBuildWarningsAsMessages. -->
<PropertyGroup Condition="'$(MSBuildWarningsAsMessages)'=='' And $([MSBuild]::AreFeaturesEnabled('16.8'))">
<MSBuildWarningsAsMessages>$(NoWarn)</MSBuildWarningsAsMessages>
<PropertyGroup Condition="$([MSBuild]::AreFeaturesEnabled('16.8'))">
<MSBuildWarningsAsMessages Condition="'$(MSBuildWarningsAsMessages)'==''">$(NoWarn)</MSBuildWarningsAsMessages>
<MSBuildWarningsAsErrors Condition="'$(MSBuildWarningsAsErrors)'==''">$(WarningsAsErrors)</MSBuildWarningsAsErrors>
</PropertyGroup>

<!-- Common Project System support -->
Expand Down

0 comments on commit 47e6ac1

Please sign in to comment.