Skip to content

PrunePackageReference and autoreferenced or IsImplicitDefined packages #14441

@nkolev92

Description

@nkolev92

Now that pruning applies to directs by apply IncludeAssets=none and PrivateAssets=all, a question came up as to what to do for auto referenced packages.

https://github.com/NuGet/Home/blob/dev/accepted/2025/PrunePackageReference-with-direct-PackageReference.md.

Autoreferenced means the SDK is saying, I control this version, add this package.
prune datameans the SDK is saying, I don't think we need this version of this package.

These are conflicting.
What should pruning do?
Currently, pruning wins.

Should autoreferenced win?
Should we raise a warning instead?
Warn and Prune potentially?

Note that the warning concern is lesser here since the data all usually comes from the .NET SDK.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions