.NET 10 Makes Missing PackageReference Versions a Hard Restore Error
.NET 10 introduces error NU1015, which causes restore to fail outright when a PackageReference is declared without a version, replacing the earlier NU1604 warning that previously allowed restore to continue. Before this change, NuGet would silently resolve the lowest available package version, a behavior Microsoft now classifies as a stable breaking change in its .NET 10 compatibility guidance. The challenge is that a versionless PackageReference is also the correct syntax when using NuGet Central Package Management (CPM), where versions are defined centrally in a Directory.Packages.props file. Developers must first determine whether a direct reference or a CPM policy should own the version, since blindly adding versions everywhere can unintentionally bypass repository-wide package governance. Microsoft's compatibility documentation and the CPM guide both outline the correct fix depending on which ownership model a project uses.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in