-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description
I noticed a regression/bug when using dotnet watch with the --no-hot-reload flag.
When executing dotnet watch run --no-hot-reload, the application starts correctly, but the console output (stdout) is completely silent/empty. No logs are displayed in the terminal.
However, when I separate the arguments using --, the output works correctly.
Reproduction Steps
- Create a new console or web application (
dotnet new web). - Run the application using:
dotnet watch run --no-hot-reload. - Observe the terminal output.
Expected Behavior
The application logs (e.g., Now listening on: https://localhost...) should be visible in the terminal, just like they are with standard dotnet run.
Actual Behavior
The application starts (verified by accessing localhost), but the terminal remains blank. No output is forwarded to the console.
Known Workaround
None
Correction regarding workaround
I previously thought that dotnet watch -- run --no-hot-reload was a workaround.
However, closer inspection reveals that while this restores stdout, it fails to disable Hot Reload (the watcher ignores the flag behind the separator and prints 🔥 Hot reload enabled).
Therefore, currently, there seems to be no way to run dotnet watch with Hot Reload disabled AND keep the console output visible.
Environment
- IDE: Visual Studio 2026 (Preview)
- OS: Windows 11
- .NET SDK: 10.0.100
Additional context
It seems like dotnet watch is consuming the stdout stream or failing to pipe it correctly when the --no-hot-reload flag is parsed directly by the watcher without the separator.