-
Notifications
You must be signed in to change notification settings - Fork 735
Pruning is enable only when a project targets/multi-targets .NET 10 #6696
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
077bf1b to
f7da7c7
Compare
donnie-msft
reviewed
Aug 12, 2025
test/NuGet.Core.Tests/NuGet.Build.Tasks.Console.Test/MSBuildStaticGraphRestoreTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.FuncTests/Msbuild.Integration.Test/NuGetPropertyDefaultsTests.cs
Show resolved
Hide resolved
test/NuGet.Core.FuncTests/Dotnet.Integration.Test/DotnetRestoreTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.FuncTests/Dotnet.Integration.Test/DotnetRestoreTests.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/Utility/PackageSpecFactory.cs
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/Utility/MSBuildRestoreUtility.cs
Outdated
Show resolved
Hide resolved
jeffkl
reviewed
Aug 12, 2025
src/NuGet.Clients/NuGet.SolutionRestoreManager/VSNominationUtilities.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/Utility/MSBuildRestoreUtility.cs
Outdated
Show resolved
Hide resolved
donnie-msft
previously approved these changes
Aug 12, 2025
jeffkl
previously approved these changes
Aug 12, 2025
donnie-msft
approved these changes
Aug 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
REstoreEnablePackagePruningbeingtrue.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