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

Outer build of multitargeted projects doesn't respect WarningsNotAsErrors #10873

Open
rainersigwald opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels
Area: Common Targets Priority:1 Work that is critical for the release, but we could probably ship without triaged

Comments

@rainersigwald
Copy link
Member

rainersigwald commented Oct 23, 2024

The promotion of 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>

Is in Microsoft.Common.CurrentVersion.targets, which is not imported into multitargeting outer builds--only the inner builds. This means that any warnings raised in the outer build (like in NuGet operations) may be promoted to error even if $(WarningsNotAsErrors) includes them.

This is very related to #10877 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common Targets Priority:1 Work that is critical for the release, but we could probably ship without triaged
Projects
None yet
Development

No branches or pull requests

3 participants