Conversation
…e installation for duplicate frameworks in PM UI and PMC
1fca40d to
66d801f
Compare
martinrrm
reviewed
Feb 6, 2026
zivkan
reviewed
Feb 7, 2026
zivkan
approved these changes
Feb 7, 2026
martinrrm
approved these changes
Feb 9, 2026
This was referenced Feb 10, 2026
Merged
3 tasks
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.
Bug
Fixes: NuGet/Home#14539
Description
In this PR I am changing BuildIntegratedInstallationContext to use string aliases instead of the NuGetFramework now that duplicate NuGetFrameworks are allowed.
The solution is simple at the bottom of it.
When we create the installation context that's in charge of writing, we explicitly use the targetAlias.
Note that in legacy projects (always one framework), the alias is "". Note that while it's always coded as such, it's not enforced through nullability or anything like that, so we account for that in the NuGetPackageManager.
I had to add a few new public APIs to support the new conditional package installation.
Add package needs similar changes too, so in a follow-up PR I'll deprecate the old ones by marking them as obsolete.
PR Checklist
Meaningful title, helpful description and a linked NuGet/Home issueAdded testsLink to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.