Skip to content

dotnet package update should work with any project references - #6846

Merged
zivkan merged 1 commit into
devfrom
dev-zivkan-dotnet-package-update-multi-projects
Oct 9, 2025
Merged

zivkan merged 1 commit into
devfrom
dev-zivkan-dotnet-package-update-multi-projects

Conversation

@zivkan

@zivkan zivkan commented Oct 8, 2025 •

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14585

Description

Fix dotnet package update so that it works with any project references.

The DependencyGraphSpec data strcuture, used for restore, needs the complete list of projects used by the "current project''s transitive project graph. The very earliest implementation of the command was only tested with a project without project references. When support for projects with project references was added, it assumed the "current project" would be first in the list, but it's not, the list is sorted alphabetically.

The test was modified to have the same scenario, so the project to update is no longer first in the sorted projects list. Running the test before the product changes validates the test catches the bug, and fixing the product code makes the test green again.

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. N/A

@zivkan
zivkan requested a review from a team as a code owner October 8, 2025 20:46
@zivkan
zivkan merged commit e8da0a8 into dev Oct 9, 2025
17 of 18 checks passed
@zivkan
zivkan deleted the dev-zivkan-dotnet-package-update-multi-projects branch October 9, 2025 20:23
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.

"dotnet package update" modifies wrong project file (csproj)

3 participants