Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PrunePackageReference support in project-system #9610

Merged

Conversation

nkolev92
Copy link
Contributor

@nkolev92 nkolev92 commented Dec 4, 2024

Design at https://github.com/NuGet/Home/blob/dev/accepted/2024/prune-package-reference.md.

This adds support for PrunePackageReference with a Version attribute and the RestoreEnablePackagePruning property.

I know in the past we've had to do certain things to get CDK working. cc @tmeschter

Microsoft Reviewers: Open in CodeFlow

@drewnoakes
Copy link
Member

As pointed out by @zivkan, we need a stub for the new DTB CollectPrunePackageReferences target, similar to:

<!-- This target is used to collect the NuGet audit supression items. It is defined by the .NET SDK starting in version 8.0.400, but we need this no-op
implementation when using older SDKs that don't have it; otherwise our design-time builds will fail. The NuGet.targets file in the SDK is imported
_after_ this file, and will override this implementation with the real one (when present).
This can (and should) be removed when we no longer need to support SDKs older than 8.0.400. -->
<Target Name="CollectNuGetAuditSuppressions" Returns="@(NuGetAuditSuppress)" />

@drewnoakes drewnoakes merged commit 661be12 into dotnet:main Dec 5, 2024
5 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 17.12 milestone Dec 5, 2024
@nkolev92 nkolev92 deleted the dev-nkolev92-AddPrunePackageReferenceSupport branch December 5, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants