Skip to content

[WIP] Clarify dotnet watch modes and behavior - #55602

Draft
tmat wants to merge 1 commit into
dotnet:mainfrom
tmat:clarify-dotnet-watch-modes
Draft

[WIP] Clarify dotnet watch modes and behavior#55602
tmat wants to merge 1 commit into
dotnet:mainfrom
tmat:clarify-dotnet-watch-modes

Conversation

@tmat

@tmat tmat commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

Updates the dotnet watch reference after auditing the page against the current implementation in dotnet/sdk.

  • distinguishes default Hot Reload mode from the MSBuild watch-list path used by --no-hot-reload, non-run commands, and --list
  • documents that static web assets can still be handled when managed Hot Reload is disabled
  • corrects Ctrl+R, rude-edit, browser-refresh, watched-file, and DOTNET_WATCH_ITERATION behavior
  • corrects the Hot Reload named-pipe variable and documents other implemented environment variables
  • synchronizes the synopsis and options with current dotnet watch --help

Implementation evidence

The mode selection and file-set differences were checked against dotnet/sdk sources, primarily:

  • src/Dotnet.Watch/dotnet-watch/Program.cs
  • src/Dotnet.Watch/Watch/HotReload/HotReloadDotNetWatcher.cs
  • src/Dotnet.Watch/dotnet-watch/Watch/DotNetWatcher.cs
  • src/Dotnet.Watch/dotnet-watch/Watch/DotNetWatch.targets
  • src/Dotnet.Watch/Watch/Build/EvaluationResult.cs
  • src/Dotnet.Watch/dotnet-watch/Watch/StaticFileHandler.cs
  • src/Dotnet.Watch/Watch/UI/RestartPrompt.cs
  • src/Dotnet.Watch/Watch/Context/EnvironmentVariables.cs

Validation

  • compared the option reference with the built SDK's dotnet watch --help
  • git diff --check passes
  • local Markdown lint wasn't available because Node.js/npm isn't installed; the repository Markdown lint workflow will validate the page

AI assistance was used to audit the implementation and draft the documentation changes under human direction.


Internal previews

File Preview link
docs/core/tools/dotnet-watch.md Preview published page

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a071c08e-ab0a-4100-8fa4-9b05d6d00bc4
Copilot AI lite review requested due to automatic review settings August 19, 2026 16:30
@tmat
tmat requested review from a team and meaghanlewis as code owners August 19, 2026 16:30
@dotnetrepoman dotnetrepoman Bot added this to the August 2026 milestone Aug 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the dotnet watch reference documentation to reflect current SDK behavior, especially around watch-mode selection, file-watching sources, Hot Reload vs. rerun-on-change behavior, and implemented environment variables.

Changes:

  • Clarifies how dotnet watch selects watch modes and how behavior differs for run, --no-hot-reload, --list, and non-run commands.
  • Updates the synopsis and options list to align with current dotnet watch --help, and expands option documentation (for example, --file, --device, and --no-restore).
  • Corrects and expands environment-variable documentation, including Hot Reload transport variables and iteration semantics.
Suppressed comments (1)

docs/core/tools/dotnet-watch.md:151

  • The options list documents the MSBuild verbosity switch as -v|-verbosity, but the long form should be --verbosity (double dash).
- **`-v|-verbosity <LEVEL>`**

  Sets the MSBuild verbosity level. The allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +27 to +28
[--sc|--self-contained] [-v|-verbosity <LEVEL>]
[--verbose] [--version]
@tmat
tmat marked this pull request as draft August 19, 2026 17:33
@tmat tmat changed the title Clarify dotnet watch modes and behavior [WIP] Clarify dotnet watch modes and behavior Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants