Skip to content

Conversation

@nkolev92
Copy link
Member

@nkolev92 nkolev92 commented Aug 8, 2025

Bug

Fixes: NuGet/Home#14345

Description

In NuGet/Home#14345 and NuGet/Home#14442, we decide to enable pruning for projects multi targeting .NET 10.

Given that this is a inner build feature, it's a bit trickier.
To do this, we introduce a new property that tells us about the default (which is an 'OR' of all properties).

The consequence of this is that REstoreEnablePackagePruning is not longer the canonical value for pruning being enabled.

This means the .NET SDK targets can't really depend on REstoreEnablePackagePruning being true.
We are going to set the condition in single targeted projects, but in multi targeted ones, we'll read the extra condition.

That means the SDK will need to change to something.
It's a minor perf hit, but the alternative is moving the enabled logic to the .NET SDK and running an extra build that basically 'ORs' these values.

cc @dsplaisted

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@nkolev92 nkolev92 force-pushed the dev-nkolev92-fixPruningOptIn branch from 077bf1b to f7da7c7 Compare August 8, 2025 16:56
@nkolev92 nkolev92 changed the title Dev nkolev92 fix pruning opt in Pruning is enable only when a project targets/multi-targets .NET 10 Aug 8, 2025
@nkolev92 nkolev92 requested review from jeffkl and zivkan and removed request for zivkan August 11, 2025 17:13
@nkolev92 nkolev92 marked this pull request as ready for review August 11, 2025 17:18
@nkolev92 nkolev92 requested a review from a team as a code owner August 11, 2025 17:18
@nkolev92 nkolev92 requested a review from donnie-msft August 11, 2025 17:18
@nkolev92 nkolev92 requested review from donnie-msft and jeffkl August 12, 2025 17:47
donnie-msft
donnie-msft previously approved these changes Aug 12, 2025
jeffkl
jeffkl previously approved these changes Aug 12, 2025
@nkolev92 nkolev92 dismissed stale reviews from jeffkl and donnie-msft via 2559e2f August 12, 2025 18:19
@nkolev92 nkolev92 requested review from donnie-msft and jeffkl August 12, 2025 18:19
@nkolev92 nkolev92 merged commit 7ad3d75 into dev Aug 12, 2025
17 of 18 checks passed
@nkolev92 nkolev92 deleted the dev-nkolev92-fixPruningOptIn branch August 12, 2025 21:14
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.

Package pruning is enabled for all projects targeting .NET 10 including multi-targeted ones

4 participants