Skip to content

Forward PackageReference declaration locations to restore - #9905

Closed
AlesProkop wants to merge 1 commit into
mainfrom
alesprokop-cps-restore-source-metadata
Closed

AlesProkop wants to merge 1 commit into
mainfrom
alesprokop-cps-restore-source-metadata

Conversation

@AlesProkop

@AlesProkop AlesProkop commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Superseded by the internal dotnet-project-system draft PR 794612. The change has been ported to the active internal repository and validated against its current main. This public draft is retained as a reference for the original prototype and its earlier validation; it is not the CPS PR to merge for the coordinated fix.

Fixes: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2905535 (as part of the coordinated VS navigation fix, continued in the internal draft above).

Include DefiningProjectFullPath, DefiningProjectLineNumber, and DefiningProjectColumnNumber in the collected PackageReference metadata sent to NuGet. CPS only collects metadata listed in this rule, so MSBuild's source information currently never reaches restore. Existing change detection picks up these values, so moving a declaration refreshes nomination without changing package identity or forcing restore.

The active CPS change is 3 of 4 in the recommended integration and rollout order. This is not a strict compile dependency chain; the full VS experience requires all four changes to ship.

  1. dotnet/msbuild#14731
  2. NuGet/NuGet.Client#7766
  3. dotnet-project-system PR 794612 (Azure DevOps) — active CPS replacement
  4. dotnet/sdk#56655

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@drewnoakes

Copy link
Copy Markdown
Member

@drewnoakes drewnoakes closed this Oct 18, 2026
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.

2 participants