dotnet / dotnet/msbuild

Solution doesn't respect WarningsNotAsErrors

Open
#10,877 1 comment 2 reactions 1 assignee Claimed by @SimaTian View on GitHub
Area: Debuggability Area: Engine Priority:1 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

The promotion of the "plain property" version of some warning-related settings:

https://github.com/dotnet/msbuild/blob/69b3e7a43fb2fb26812b20807333cf6ca62167f2/src/Tasks/Microsoft.Common.CurrentVersion.targets#L668-L672

Is in `Microsoft.Common.CurrentVersion.targets`, which is not imported into solution metaprojects. This means that any warnings raised in the solution itself (like in NuGet operations) may be promoted to error even if `$(WarningsNotAsErrors)` includes them.

This is very related to #10873 and we should consider fixing both by looking at the unprefixed versions in the engine (if the prefixed version is unset) rather than requiring XML logic to do it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.