Skip to content

Preserve source locations when replaying restore diagnostics - #56655

Draft
AlesProkop wants to merge 1 commit into
dotnet:mainfrom
AlesProkop:alesprokop-sdk-restore-diagnostic-navigation
Draft

AlesProkop wants to merge 1 commit into
dotnet:mainfrom
AlesProkop:alesprokop-sdk-restore-diagnostic-navigation

Conversation

@AlesProkop

@AlesProkop AlesProkop commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Fixes: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2905535 as part of the coordinated Visual Studio navigation fix.

Preserve diagnostic files and coordinates through the SDK assets cache and MSBuild logging. Rebind supported diagnostics to current, uniquely identified PackageReference declarations so navigation remains correct when they move during a no-op restore. This is needed here because ResolvePackageAssets drops NuGet locations before Visual Studio displays the warning. Missing or ambiguous origins keep the project fallback; source-only moves do not rewrite restore files or invalidate the assets cache.

Merge 4 of 4. Recommended integration order is MSBuild → NuGet.Client → project-system → SDK, not a strict compile-dependency chain. The full Visual Studio fix needs all four changes to ship.

Companion PRs, in order:

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

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

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

This branch has not been deployed

No deployments
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.

1 participant