Urgent.News

What's breaking now, across thousands of outlets.

Tech

.NET 10 NU1510 Package Pruning: Fix CI Without Breaking Legacy Targets

.NET 10 NU1510 package pruning can turn an SDK upgrade into a failed restore when a repository promotes warnings to errors. The tempting fix is to delete the named PackageReference everywhere. That is safe for a net10.0 -only application when the framework supplies the assembly, but it can break a library that still targets netstandard2.0 . I treat NU1510 as a target-specific dependency decision:…

.NET 10 introduced package pruning for projects targeting .NET 10 or later, which automatically removes direct references to packages already supplied by the targeted SDK. When a repository promotes warnings to errors through the TreatWarningsAsErrors property, deleting these references can cause CI failures, especially for libraries targeting older frameworks like netstandard2.0.

The recommended solution is to conditionally include the package reference based on the target framework, retaining it for netstandard2.0 where necessary and removing it for net10.0 only applications. This approach ensures the library's functionality remains intact while avoiding CI failures caused by the NU1510 diagnostic. It is important to verify the dependency graph for all supported targets before removing any references, as suppressing the warning alone does not guarantee the correct published dependency contract.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

NordVPN’s Coupon Page Is Not Its Cheapest Offer

The post NordVPN’s Coupon Page Is Not Its Cheapest Offer by Benzinga Contributors appeared first on Benzinga . Visit Benzinga to get more great content like this. Every VPN sells the same way, with a monthly rate small enough to feel like nothing attached to a term long enough that it adds up.

More from Monday 24 August →