vs code extension file-based app fixes#15170
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15170Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15170" |
There was a problem hiding this comment.
Pull request overview
Ensures file-based .NET apps are built before launch and that debug/no-debug run mode is correctly propagated for project resources (especially in polyglot AppHost scenarios), while standardizing project builds in the VS Code extension on the dotnet CLI instead of C# Dev Kit tasks.
Changes:
- Respect
KnownConfigNames.DebugSessionRunModewhen creating project launch configurations in the AppHost DCP executor. - Remove C# Dev Kit task-based project builds in the extension and rely on
dotnet build. - Always build file-based apps before launching/debugging to avoid running stale cached outputs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Aspire.Hosting/Dcp/DcpExecutor.cs | Uses configured debug session run mode for project launch configurations instead of relying solely on Debugger.IsAttached. |
| extension/src/debugger/languages/dotnet.ts | Removes Dev Kit build path and forces a CLI build for file-based apps before debug launch. |
You can also share your feedback on Copilot code review. Take the survey.
IEvangelist
left a comment
There was a problem hiding this comment.
LGTM. Have you tested this with all variations of C# DevKit extension, C# extension, etc.? Just to verify it works regardless of developer setup?
Yes! I have |
Description
Discovered during dogfooding. File-based apps should be built before launch, as we aren't using dotnet run to launch them (which will handle build). Also, for polyglot apphosts, to debug file-based apps we need
KnownConfigNames.DebugSessionRunModeto be respected (NoDebug is currently set based on whether a debugger is attached, which is not true for the apphost server).Removes C# dev kit build of dotnet projects and just uses the dotnet CLI. We had agreed to make this change before, it just never happened.
Fixes #15161 and fixes #15162
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: