Skip to content

Get reference nearest disambiguates with an alias too - #7218

Merged
nkolev92 merged 3 commits into
devfrom
dev-nkolev92-getreferencenearestusesalias
Mar 20, 2026
Merged

nkolev92 merged 3 commits into
devfrom
dev-nkolev92-getreferencenearestusesalias

Conversation

@nkolev92

@nkolev92 nkolev92 commented Mar 16, 2026 •

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14807

Description

ProjectNETCurrent (apple; banana) both target net10.0
has a project reference to
ProjectNETPrevious (apple; banana), both target net8.0.

ProjectReference works!

ProjectNET (apple;) target net10.0
has a project reference to
ProjectNETFramework (apple;), target n472.

ProjectReference works with a NU1702 warning.

Now take the following:

ProjectNET (apple; banana) both target net10.0
has a project reference to
ProjectNETFramework (apple; banana), both target n472.

This PR ensures this scenario works as well and it disambiguates with the alias.

While working on this I did hit NuGet/Home#12010 as well I have created NuGet/Home#14815 as a follow-up to the bug I discovered. I have also added a test that's skipped that basically validates the scenario.

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-getreferencenearestusesalias branch 2 times, most recently from 386cf1d to 3a03400 Compare March 19, 2026 22:22
@nkolev92
nkolev92 force-pushed the dev-nkolev92-getreferencenearestusesalias branch from 73bdf3f to 8f052f5 Compare March 19, 2026 22:27
@nkolev92
nkolev92 marked this pull request as ready for review March 19, 2026 23:32
@nkolev92
nkolev92 requested a review from a team as a code owner March 19, 2026 23:32
@nkolev92
nkolev92 requested review from jeffkl and martinrrm March 19, 2026 23:32
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.

GetReferenceFrameworkNearestTask does not use aliases for disambiguation when using AssetTargetFallback

4 participants