Skip to content

Fix NU1601/NU1604 alias warnings in UnexpectedDependencyMessages - #7348

Merged
nkolev92 merged 3 commits into
devfrom
dev-nkolev92-badErrorMessageGeneration
Apr 30, 2026
Merged

nkolev92 merged 3 commits into
devfrom
dev-nkolev92-badErrorMessageGeneration

Conversation

@nkolev92

@nkolev92 nkolev92 commented Apr 30, 2026 •

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14877

Description

Fix NU1601 and NU1604 warnings being incorrectly generated when multiple framework aliases target the same TFM.

NU1601: GetBumpedUpDependencies grouped graphs by NuGetFramework, conflating aliases that share a TFM. Now iterates per-graph using IRestoreTargetGraph.TargetAlias for dependency lookup.

NU1604: GetDependencyTargetGraphs returned FrameworkName.ToString() instead of the alias name. Now uses TargetFrameworkInformation.TargetAlias when available.

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 requested a review from a team as a code owner April 30, 2026 00:15
@nkolev92
nkolev92 merged commit 1b76154 into dev Apr 30, 2026
17 of 18 checks passed
@nkolev92
nkolev92 deleted the dev-nkolev92-badErrorMessageGeneration branch April 30, 2026 19:44
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.

Spurious NU1601 warning when framework aliases of the same framework have different versions of the same package

2 participants