Skip to content

vs code extension file-based app fixes#15170

Merged
adamint merged 4 commits intomicrosoft:release/13.2from
adamint:dev/adamint/extension-file-based-app-fixes
Mar 12, 2026
Merged

vs code extension file-based app fixes#15170
adamint merged 4 commits intomicrosoft:release/13.2from
adamint:dev/adamint/extension-file-based-app-fixes

Conversation

@adamint
Copy link
Member

@adamint adamint commented Mar 12, 2026

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.DebugSessionRunMode to 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

  • 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
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@adamint adamint self-assigned this Mar 12, 2026
Copilot AI review requested due to automatic review settings March 12, 2026 13:36
@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15170

Or

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

@adamint adamint requested a review from mitchdenny as a code owner March 12, 2026 13:39
@adamint adamint changed the title Dev/adamint/extension file based app fixes vs code extension file-based app fixes Mar 12, 2026
Copy link
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

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.DebugSessionRunMode when 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.

Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

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

LGTM. Have you tested this with all variations of C# DevKit extension, C# extension, etc.? Just to verify it works regardless of developer setup?

@adamint
Copy link
Member Author

adamint commented Mar 12, 2026

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

@adamint adamint enabled auto-merge (squash) March 12, 2026 15:12
@adamint adamint merged commit 8274e84 into microsoft:release/13.2 Mar 12, 2026
497 of 501 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants