Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

NU1015 means NuGet found a PackageReference without a version while restoring a .NET 10 project. If the project uses Central Package Management (CPM), first check why that configuration is not being applied; if it does not use CPM, add an explicit version to the reference.

What NU1015 means in .NET 10

Starting with .NET 10, a package reference with no version produces error NU1015. Previously, the same condition produced warning NU1604, which said the dependency had no inclusive lower bound. Microsoft changed the behavior because the old warning could allow restore to select the lowest available package version, a result developers often do not intend. The new diagnostic reads: “The following PackageReference item(s) do not have a version specified: PackageA.” Microsoft documents the .NET 10 change.

Find the versionless package reference

The offending item may be in the project file or in an imported MSBuild file, such as Directory.Build.props. Search the project and relevant imported configuration for the package named in the NU1015 message. The NuGet NU1015 reference describes the diagnostic and its cause.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the fix that matches your versioning setup

If the project does not use Central Package Management

Add a version to the PackageReference. For example:

<PackageReference Include="Some.Package" Version="1.2.3" />

Use the version your project intends to depend on; do not treat the example version as a recommendation for a particular package.

If the project uses Central Package Management

With CPM, versions are managed centrally, so a PackageReference can intentionally omit its version. Do not add an arbitrary local version before checking the solution’s configuration. Instead, verify why CPM is disabled or not applying to this reference, including whether the item is declared in the expected project or imported configuration. The Microsoft .NET 10 compatibility note and NuGet error reference describe the distinction between versioned references and centrally managed versions.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Alternatives when selecting the lowest version is intentional

Use Version=”0.0.0″

Microsoft’s compatibility note documents Version="0.0.0" for cases where selecting the lowest package version is deliberate. This produces warning NU1603 rather than the previous NU1604. It is a specialized choice, not a general replacement for specifying the intended dependency version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set SdkAnalysisLevel to 9.0.300 or lower

The same note documents setting SdkAnalysisLevel to 9.0.300 or lower to return to the previous warning behavior. This setting also affects other features gated by SdkAnalysisLevel, so it is broader than a switch for NU1015 alone. Prefer correcting the reference or CPM configuration unless that broader change is intentional. See Microsoft’s compatibility guidance for the documented behavior.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.