Improve Aspire VS Code extension discoverability#15760
Improve Aspire VS Code extension discoverability#15760adamint merged 2 commits intomicrosoft:mainfrom
Conversation
- 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
There was a problem hiding this comment.
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.jsonto the active CLI templates so VS Code recommends the Aspire extension on open. - Update extension Marketplace metadata (keywords + gallery banner).
- Add Aspire-specific
workspaceContainsactivation 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. |
| "onDebugDynamicConfigurations:aspire", | ||
| "workspaceContains:**/*.csproj", | ||
| "workspaceContains:**/aspire.config.json", | ||
| "workspaceContains:**/.aspire/**", |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
the problem is there are many aspire apps that include program.cs as their apphost entrypoint
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15760Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15760" |
JamesNK
left a comment
There was a problem hiding this comment.
1 observation about template coverage for non-C# empty app host paths.
| "recommendations": [ | ||
| "microsoft-aspire.aspire-vscode" | ||
| ] | ||
| } |
There was a problem hiding this comment.
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.
|
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.
|
Description
Improves the discoverability of the Aspire VS Code extension through several targeted changes:
CLI Templates — Added
.vscode/extensions.jsonto all 3 active CLI templates (empty-apphost,ts-starter,py-starter) so that every project created viaaspire neworaspire initautomatically recommends the Aspire extension when opened in VS Code.Activation Events — Added
workspaceContains:**/aspire.config.jsonandworkspaceContains:**/.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 agalleryBannerwith the Aspire brand purple (#512BD4) for visual presence in search results.Checklist