Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 999 Bytes

File metadata and controls

30 lines (22 loc) · 999 Bytes
title NuGet Warning NU1511
description NU1511 warning code
author nkolev92
ms.author nikolev
ms.date 02/04/2025
ms.topic reference
f1_keywords
NU1511

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.