-
Couldn't load subscription status.
- Fork 713
Fix flashing console windows when Docker processes are launched on Windows #11570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ndows on Windows Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
|
@copilot The settings for launching processes already has |
The key difference is:
The original code had only This matches the pattern used by Commit: 8011b77 |
|
@copilot Is it valid for both values to be set at the same time on the settings? |
Yes, it's completely valid to set both properties simultaneously. This is demonstrated in the Aspire codebase itself:
Setting both is a defensive programming approach - The .NET ProcessStartInfo class accepts both properties without conflict, and the combination provides the most robust solution for background processes. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11570Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11570" |
|
@eerhardt Can you try this and see if it fixes the flashing windows issue you were seeing? |
|
I tried it locally and it does appear to fix the issue. I don't get a flashing console window anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Fixes flashing console windows when Docker processes are launched on Windows by adding CreateNoWindow = true to ProcessUtil.Run(). The issue occurred during aspire deploy operations where Docker health checks, image tagging, and pushing operations would briefly show console windows.
- Adds
CreateNoWindow = trueproperty toProcessStartInfoconfiguration inProcessUtil.Run() - Brings process execution behavior consistent with other Aspire components like
DotNetCliRunnerandDevTunnelCli - Affects all external processes launched via
ProcessUtil.Run()including Docker, Podman, Azure Bicep, and DCP operations
|
/backport to release/9.5 |
|
Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/17962248734 |
When running
aspire deployon Windows, Docker processes were showing flashing console windows during health checks, image tagging, and pushing operations. This was caused byProcessUtil.Run()missing theCreateNoWindow = trueproperty in itsProcessStartInfoconfiguration.The issue was identified by comparing process configurations:
Before (ProcessUtil.Run - causing flashing windows):
Working implementations (DotNetCliRunner, DevTunnelCli):
This fix adds
CreateNoWindow = truetoProcessUtil.Run(), bringing it in line with other process execution patterns used throughout Aspire. The change affects all processes launched viaProcessUtil.Run(), including:The fix is minimal and surgical - adding exactly one line to ensure consistent behavior across all external process execution in Aspire.
Fixes #11499.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.