Skip to content

[VS Code] Add "Go to source" action for source-backed resources #20424

Description

Summary

Source-backed Aspire resources, such as a .NET project, should expose a Go to source action in the VS Code extension.

Selecting the action would switch focus to the VS Code Explorer and reveal/select the resource's source location. For a .NET project resource, this could select the project file or project directory.

Motivation

The Aspire resource view is useful for understanding and operating a distributed application, but moving from a running resource back to its implementation currently requires manually finding the corresponding project in the workspace.

This becomes increasingly cumbersome in larger solutions, multi-root workspaces, and applications containing similarly named projects. The resource already has source metadata, so the extension can provide a direct navigation path.

Proposed experience

Add Go to source to the context menu or actions for resources that have a local source location.

When invoked, the extension should:

  1. Resolve the resource's source path.
  2. Switch focus to the VS Code Explorer.
  3. Reveal and select the source location.

For example:

  • .NET project resource: reveal the .csproj or its containing directory.
  • JavaScript/Python source-backed resource: reveal the configured project/application directory.
  • Executable resource with a workspace source path: reveal the corresponding file or working directory where possible.

Expected behavior

  • The action is shown only when the resource has a resolvable local source path.
  • Paths are resolved correctly for multi-root workspaces and worktrees.
  • If the source is outside the current workspace or no longer exists, the extension reports a clear message rather than silently doing nothing.
  • Selecting the action does not open a duplicate workspace or modify the current Aspire session.

Possible placement

  • Resource context menu: Go to source
  • Resource details/action toolbar

The context-menu option would provide the most direct equivalent to existing VS Code navigation actions such as revealing a file in the Explorer.

Activity

added
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
on Sep 24, 2026

joperezr commented on Sep 24, 2026

@joperezr
Member
🤖 Aspire triage pass — 2026-09-24 07:02 UTC

Area: area-vscode-extension
Kind: feature-request
Repro: none — the issue describes a proposed navigation experience rather than a failing scenario
Affected version(s): not version-specific (latest: 13.5.4)
Severity: S4 — UX enhancement; no existing core scenario is reported broken

Urgency: ⚪ backlog — no milestone
Reason: concrete feature request, but not important or actionable enough for 13.6

Suggested owner(s): Adam Ratzman (@adamint) (score 398), backup Ella Hathaway (@ellahathaway) (score 148)
Evidence:

Confidence: high
Needs human?: no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions