[vs17.12] Consistently respect unprefixed Warning-as-error/message/warning properties#11007
Merged
rainersigwald merged 5 commits intovs17.12from Nov 21, 2024
Merged
Conversation
8180d6d to
5e4c8a5
Compare
rainersigwald
approved these changes
Nov 21, 2024
marcpopMSFT
approved these changes
Nov 21, 2024
#10942) * add WarningsAsMessages, WarningsAsErrors, WarningsNotAsErrors and TreatWarningsAsErrors to the engine (e.g. variant without prefix). test those so that nothing breaks * Optional output in BuildProjectExpectFailure Optionally capture output in BuildProjectExpectFailure for better test diagnosability. * Capture output logging in new tests * working through the review. Some test improvements. Changewave used. Comments. * addressing review comments * final review round, minor test update --------- Co-authored-by: Rainer Sigwald <raines@microsoft.com>
Normally we wouldn't have this changewave in this release, but because we want to have a consistent changewave for behavior changed after release, we're backporting it.
14f47e6 to
04b036d
Compare
This was referenced Jul 28, 2025
This was referenced Aug 15, 2025
This was referenced Aug 17, 2025
Closed
Closed
This was referenced Aug 24, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #10942.
Fixes #10877 and #10873.
Work item (Internal use):
Summary
Respect
WarningsAsMessages,WarningsAsErrors,WarningsNotAsErrors, andTreatWarningsAsErrorsin addition to theirMSBuild-prefixed versions in all projects, not just ones that importMicrosoft.Common.CurrentVersion.targets.Customer Impact
Reduced complexity in opting to keep warnings as warnings, making it easier to configure warnings how you expect.
Regression?
No, this behavior is longstanding. It's higher severity now due to the NuGet Audit warnings, which are often created in one project (where a package is referenced) but raised in another (where the restore actually happened), which may have the easy-to-type form of the property but not the respected-before-this-change one.
Testing
New and existing automated tests.
Risk
Medium-low. Users almost certainly intended this behavior and it works this way in most project types. To mitigate risk further, the behavior can be reverted to the prior behavior with an environment variable (changewave).