sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Suppressed NuGet warnings resurface in referencing projects since SDK 10.0.200

Open chkoella opened this issue 8 months ago • 4 comments

Describe the bug

When referencing a NuGet package that creates a warning e.g. NU1701, NU1903 etc. the warning can be suppressed using the NoWarn attribute in the <PackageReference ... /> tag. If I do this in my library project and reference that project in my WPF application, this was no problem/warning (works with SDK 10.0.103, 10.0.104 and 10.0.105). Starting with SDK 10.0.200 the WPF application now reports the NuGet warnings from my library project. I cannot suppress these warnings. I tried <NoWarn>NU1701;NU1903</NoWarn> and even explicitly adding the <PackageReference... /> in the WPF Application with NoWarn attribute again. Only projects with windowsdesktop targets (e.g. net10.0-windows) seem to be affected. A console app or unit test that target net10.0 seem not to be affected.

To Reproduce

Attached is a small solution (WaringRepro.zip) with 3 Projects (library, CLI and WPF application). The solution also contains a powershell script to build with SDK-Versions 10.0.103, 10.0.104, 10.0.105, 10.0.200 and 10.0.201

WarningRepro.zip

chkoella avatar Mar 17 '26 23:03 chkoella

cc @zivkan @nkolev92

Youssef1313 avatar Mar 19 '26 11:03 Youssef1313

Thanks for creating this issue! We believe this issue is related to NuGet tooling, which is maintained by the NuGet team. Thus, we closed this one and encourage you to raise this issue in the NuGet repository instead. Don’t forget to check out NuGet’s contributing guide before submitting an issue!

If you believe this issue was closed out of error, please comment to let us know.

Happy Coding!

Dup of https://github.com/nuget/home/issues/14756.

This is all merged, it's just waited for the April release for 10.0.202.

@chkoella Workarounds wise, you can specify the framework in a fully qualified way:

net10.0-windows7.0 or potentially just install 202 from https://github.com/dotnet/dotnet/blob/main/docs/builds-table.md.

nkolev92 avatar Mar 19 '26 17:03 nkolev92

Tested yesterday with the officially released 10.0.202 and can confirm my scenario works again. @nkolev92 Thank you.

chkoella avatar Apr 18 '26 15:04 chkoella