[release/10.0.1xx] Package Pruning data fixes for past frameworks#51343
Merged
ericstj merged 6 commits intodotnet:release/10.0.1xxfrom Oct 21, 2025
Merged
[release/10.0.1xx] Package Pruning data fixes for past frameworks#51343ericstj merged 6 commits intodotnet:release/10.0.1xxfrom
ericstj merged 6 commits intodotnet:release/10.0.1xxfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Removes package entries from the netstandard2.1 framework package list that were present in packageoverrides but not actually referenced by the targeting pack.
- Pruned unused package mappings (e.g., System.Collections.Immutable, System.Reflection.TypeExtensions, security-related packages).
- Removed an explanatory comment tied to a now-eliminated (commented-out) package entry.
ericstj
commented
Oct 17, 2025
src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.netstandard2.1.cs
Show resolved
Hide resolved
…geoverrides but not present in references
3966b93 to
fab2673
Compare
This assembly is present, but its a minimal compat facade. It should not take the place of the package.
This assembly does not version in the same way as others since it's 1/1 with it's .NETFramework name. The tooling which calculated these pruning lists didn't catch that. Also updating the net9 WindowsDesktop pruning data to capture the GA versions.
nkolev92
reviewed
Oct 20, 2025
src/Tasks/Microsoft.NET.Build.Tasks/FrameworkPackages/FrameworkPackages.net9.0.cs
Outdated
Show resolved
Hide resolved
This assembly is part of ASPNETCore, but never exposed from the targeting pack
dsplaisted
approved these changes
Oct 21, 2025
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
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.
Fixes #51320
Customer Impact
net8.0, as the framework copy would be used instead of package. (unsupported framework versions)net9.0was pruning only 8.0 package versions. No customer impact other than pruning less than we could.netcoreapp3.0which could lead to ref-def mismatch errors at runtime. (unsupported framework version)netstandard2.0were pruned at lower versions due to inconsistent facade assembly versioning in netstandard (corefx servicing interaction with standard repo). Many of these packages would be pruned by other packages which depended on them, but not directly. No customer impact other than pruning less than we could.Regression
Regression caused when enabling pruning. Customer with a project that works will face these issues when adding a
net10target to a multi-targeted project, or manually enabling package pruning.Testing
Fixed the initial customer report, then did extensive adhoc testing by restoring pruned package versions for every framework version and comparing the result to references exposed for that framework.
https://github.com/ericstj/scratch/tree/pruningTest
Example tests:
Risk
Low: In most cases pruned data is pruning less. Test methodology can observe the results of these changes to ensure they don't have side-effects other than desired.
@dsplaisted @nkolev92