Skip to content

Improve Aspire VS Code extension discoverability#15760

Merged
adamint merged 2 commits intomicrosoft:mainfrom
adamint:dev/adamint/extension-discoverability
Apr 2, 2026
Merged

Improve Aspire VS Code extension discoverability#15760
adamint merged 2 commits intomicrosoft:mainfrom
adamint:dev/adamint/extension-discoverability

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented Apr 1, 2026

Description

Improves the discoverability of the Aspire VS Code extension through several targeted changes:

CLI Templates — Added .vscode/extensions.json to all 3 active CLI templates (empty-apphost, ts-starter, py-starter) so that every project created via aspire new or aspire init automatically recommends the Aspire extension when opened in VS Code.

Activation Events — Added workspaceContains:**/aspire.config.json and workspaceContains:**/.aspire/** activation events so the extension activates on Aspire-specific project markers (not just any .csproj). This ensures polyglot Aspire projects (TypeScript, Python) also trigger activation.

Marketplace Metadata — Expanded keywords from 3 to 5 (added aspire, distributed) and added a galleryBanner with the Aspire brand purple (#512BD4) for visual presence in search results.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

- Add .vscode/extensions.json to CLI templates (empty-apphost, ts-starter, py-starter) recommending the Aspire extension
- Add aspire.config.json and .aspire/** activation events for targeted Aspire project detection
- Expand marketplace keywords to 5 (added 'aspire', 'distributed')
- Add galleryBanner with Aspire brand purple for marketplace visibility
Copilot AI review requested due to automatic review settings April 1, 2026 17:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the discoverability of the Aspire VS Code extension by updating CLI templates to recommend the extension, expanding Marketplace metadata, and broadening activation events so polyglot Aspire workspaces can trigger activation.

Changes:

  • Add .vscode/extensions.json to the active CLI templates so VS Code recommends the Aspire extension on open.
  • Update extension Marketplace metadata (keywords + gallery banner).
  • Add Aspire-specific workspaceContains activation events (aspire.config.json, .aspire).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Aspire.Cli/Templating/Templates/ts-starter/.vscode/extensions.json Recommends the Aspire VS Code extension for TS starter projects.
src/Aspire.Cli/Templating/Templates/py-starter/.vscode/extensions.json Recommends the Aspire VS Code extension for Python starter projects.
src/Aspire.Cli/Templating/Templates/empty-apphost/.vscode/extensions.json Recommends the Aspire VS Code extension for empty AppHost projects.
extension/package.json Improves Marketplace metadata and adds Aspire-specific activation events.

Comment on lines 35 to +38
"onDebugDynamicConfigurations:aspire",
"workspaceContains:**/*.csproj",
"workspaceContains:**/aspire.config.json",
"workspaceContains:**/.aspire/**",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workspaceContains:**/*.csproj remains in the activationEvents list, so the extension will still activate for any workspace that contains a .csproj (including non-Aspire repos). Given activate() starts RPC/DCP servers and a workspace describe watch, this is likely to have unnecessary startup/perf impact and also seems to conflict with the PR description (“not just any .csproj”). Consider narrowing this trigger (e.g., to *.AppHost.csproj / AppHost-specific markers) or updating the description if broad activation is still intended.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is there are many aspire apps that include program.cs as their apphost entrypoint

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe in the future?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15760

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15760"

Copy link
Copy Markdown
Member

@JamesNK JamesNK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 observation about template coverage for non-C# empty app host paths.

"recommendations": [
"microsoft-aspire.aspire-vscode"
]
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extensions.json is picked up by CopyTemplateTreeToDiskAsync("empty-apphost", ...) which only runs for C# empty app hosts. The TypeScript empty (aspire-ts-empty) and Java empty (aspire-java-empty) templates go through the scaffolding service path in CliTemplateFactory.EmptyTemplate.cs and won't receive this file.

The TS starter and Python starter templates have their own copies so they're fine, but aspire new with a TypeScript or Java empty app host won't get the VS Code extension recommendation. Worth a follow-up if those templates are commonly used.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@adamint adamint merged commit 7986cb8 into microsoft:main Apr 2, 2026
520 of 524 checks passed
@joperezr joperezr added this to the 13.3 milestone Apr 14, 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.

5 participants