-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[release/10.0.1xx] Package Pruning data fixes for past frameworks #51343
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
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