Edit

Share via


NuGet Warning NU1511

Scenario 1

A ProjectReference cannot be pruned, X.

Issue

The project id X has been specified for pruning through the PrunePackageReference feature. Pruning of projects is not supported.

Solution

  • The .NET SDK generally specifies the list of packages to be pruned. It may mean that you have a project matching the id of a platform assembly. In this scenario, change the name of the project.
  • If the PrunePackageReference has been specified within your project, you may need to remove the PrunePackageReference

Note

In order to allow for easier adoption of the PrunePackageReference feature, this warning is raised by default when a project targets the .NET 10 framework or newer.