Skip to content

Keep the whole NoWarn list, and each target framework once - #826

Merged
SimonCropp merged 1 commit into
mainfrom
fix-nowarn-overwrite
Aug 22, 2026
Merged

Keep the whole NoWarn list, and each target framework once#826
SimonCropp merged 1 commit into
mainfrom
fix-nowarn-overwrite

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

Directory.Build.props declared NoWarn twice. The second declaration replaced the
first rather than adding to it, so CS0649, NU1608 and NU1109 were suppressed
nowhere - and with TreatWarningsAsErrors on, the next unassigned field would have
failed the build rather than warned in it. One list now, with everything both had.

DiffEngine.csproj also listed net9.0 and net10.0 in both of its TargetFrameworks
lines. MSBuild collapses that, so it built the same set, but the file said
something it did not mean.

Neither shows up in a build, which is why the two rules are asserted in a test
instead.

Directory.Build.props declared NoWarn twice. The second declaration replaced the
first rather than adding to it, so CS0649, NU1608 and NU1109 were suppressed
nowhere - and with TreatWarningsAsErrors on, the next unassigned field would have
failed the build rather than warned in it. One list now, with everything both had.

DiffEngine.csproj also listed net9.0 and net10.0 in both of its TargetFrameworks
lines. MSBuild collapses that, so it built the same set, but the file said
something it did not mean.

Neither shows up in a build, which is why the two rules are asserted in a test
instead.
@SimonCropp
SimonCropp merged commit ee5fec9 into main Aug 22, 2026
9 checks passed
@SimonCropp
SimonCropp deleted the fix-nowarn-overwrite branch August 22, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant