Repository navigation
aspire run hangs on build errors when using defaultWatchEnabled #13142
Copy link
Copy link
Labels
area-cli‼️regression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!This used to work in an earlier version of Aspire and we broke it!
Milestone
Description
Activity
- changed the title
[-]aspire run hides build errors when using defaultWatchEnabled[/-][+]aspire run hangs on build errors when using defaultWatchEnabled[/+]on Nov 23, 2025 Same, it's because the
dotnet watchprocess doesnt exit after build fails, and aspire fails to detect the build error.Notice the second last line in the output below.
From
aspire run -dwith defaultWatchEnabled set in .aspire/settings.json:[10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch 🔨 Build FAILED. [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch 🔨 [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch ❌[Redacted] (94,46): error CS0246: The type or namespace name '[Redacted]' could not be found (are you missing a using directive or an assembly reference?) [[Redacted]] [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch ❌ [Redacted] (95,44): error CS0246: The type or namespace name '[Redacted]' could not be found (are you missing a using directive or an assembly reference?) [[Redacted]] [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch 🔨 0 Warning(s) [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch 🔨 2 Error(s) [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch 🔨 [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch 🔨 Time Elapsed 00:00:09.09 [10:38:08] [dbug] DotNetCliRunner: dotnet(13576) stderr: dotnet watch ⏳ Waiting for a file to change before restarting ... [10:38:08] [dbug] AppHostCliBackchannel: Connecting to AppHost backchannel at C:\Users\BårdKalbakk\.aspire\cli\backchannels\cli.sock.5233fde4169144fc8877e7621725bb54aspire version: 13.1.1+6c6cd23e4d6e647d17a9689c3104dcbd21f42fb5
.net version: 10.0.103Still happens in 13.2.1 after putting
"features": { "defaultWatchEnabled": true }
into
aspire.config.jsonas it replaced./.aspire/settings.jsonAppHost eventually starts if the compilation errors are fixed and files saved.
Bertolossi commented
on May 2, 2026 ContributorMore actionsCLI was skipping its pre-build in watch mode and dotnet watch doesn't exit on build errors, so the CLI hung on the backchannel. PR makes the CLI always pre-build so failures surface immediately
Reacted by David FowlerReacted by Johan Runsten- added‼️regression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!This used to work in an earlier version of Aspire and we broke it!
on May 3, 2026 - added a commit that references this issue
on May 11, 2026 - added a commit that references this issue
on May 18, 2026 - locked and limited conversation to collaborators
on Jun 10, 2026
Metadata
Metadata
Assignees
Labels
area-cli‼️regression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!This used to work in an earlier version of Aspire and we broke it!
Is there an existing issue for this?
Describe the bug
When using the feature flag
defaultWatchEnabled: true, whenever there's a build errors in the solutionaspire runwill hang on "Connecting to apphost..." until exiting manually.Expected Behavior
aspire run should exit and show there's a build error.
Steps To Reproduce
Put this in .aspire/settings.json, introduce a build error anywhere in the solution and run
aspire run.Exceptions (if any)
No response
.NET Version info
.net 10 ga
Anything else?
aspire 13.0.0 and 13.1.0-preview.1.25572.6
vscode
devcontainer