Skip to content

Commit 0767872

Browse files
authored
Document breaking change: 'dotnet watch' logs to stderr instead of stdout in .NET 10 RC 2 (#48925)
1 parent 9a4b0fe commit 0767872

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

docs/core/compatibility/10.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
112112
| [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 |
113113
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
114114
| [`dotnet tool install --local` creates manifest by default](sdk/10.0/dotnet-tool-install-local-manifest.md) | Behavioral change | Preview 7 |
115+
| [`dotnet watch` logs to stderr instead of stdout](sdk/10.0/dotnet-watch-stderr.md) | Behavioral change | RC 2 |
115116
| [project.json not supported in `dotnet restore`](sdk/10.0/dotnet-restore-project-json-unsupported.md) | Source incompatible | Preview 7 |
116117
| [SHA-1 fingerprint support deprecated in `dotnet nuget sign`](sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md) | Behavioral change | Preview 1 |
117118
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Breaking change: 'dotnet watch' logs to stderr instead of stdout"
3+
description: "Learn about the breaking change in .NET 10 where 'dotnet watch' emits its internal-facing log messages to stderr instead of stdout."
4+
ms.date: 10/08/2025
5+
ai-usage: ai-generated
6+
ms.custom: https://github.com/dotnet/docs/issues/45871
7+
---
8+
# 'dotnet watch' logs to stderr instead of stdout
9+
10+
Starting in .NET 10, [`dotnet watch`](../../../tools/dotnet-watch.md) emits its internal-facing log messages to the `stderr` channel instead of `stdout`. This change is part of a general trend towards `dotnet` CLI commands not obscuring the `stdout` channel. That channel is often reserved for special semantics when running certain kinds of applications, like LSP or MCP servers.
11+
12+
## Version introduced
13+
14+
.NET 10 RC 2
15+
16+
## Previous behavior
17+
18+
Previously, [`dotnet watch`](../../../tools/dotnet-watch.md) emitted log messages to `stdout`.
19+
20+
## New behavior
21+
22+
Starting in .NET 10, [`dotnet watch`](../../../tools/dotnet-watch.md) emits log messages to `stderr`.
23+
24+
## Type of breaking change
25+
26+
This change is a [behavioral change](../../categories.md#behavioral-change).
27+
28+
## Reason for change
29+
30+
This change is part of a general trend towards `dotnet` CLI commands not obscuring the `stdout` channel, which is often reserved or assumed to have special semantics when running certain kinds of applications, like LSP or MCP servers. In general, the .NET CLI should get out of the way of your applications.
31+
32+
## Recommended action
33+
34+
Most users shouldn't need to take any action. If you need the `dotnet watch` messages on `stdout`, you can redirect the `stderr` stream to `stdout`. For example, use `2>&1` to redirect the `2` file descriptor for `stderr` to the `1` file descriptor for `stdout`.
35+
36+
## Affected APIs
37+
38+
None.

docs/core/compatibility/toc.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ items:
130130
href: sdk/10.0/dotnet-package-list-restore.md
131131
- name: "`dotnet tool install --local` creates manifest by default"
132132
href: sdk/10.0/dotnet-tool-install-local-manifest.md
133+
- name: "`dotnet watch` logs to stderr instead of stdout"
134+
href: sdk/10.0/dotnet-watch-stderr.md
135+
- name: HTTP warnings promoted to errors in package list and search
136+
href: sdk/10.0/http-warnings-to-errors.md
133137
- name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed
134138
href: sdk/10.0/custom-build-event-warning.md
135139
- name: MSBuild custom culture resource handling
@@ -138,16 +142,14 @@ items:
138142
href: sdk/10.0/nu1510-pruned-references.md
139143
- name: NuGet packages with no runtime assets aren't included in deps.json
140144
href: sdk/10.0/deps-json-trimmed-packages.md
141-
- name: PackageReference without a version raises error
142-
href: sdk/10.0/nu1015-packagereference-version.md
143-
- name: PrunePackageReference privatizes direct prunable references
144-
href: sdk/10.0/prune-packagereference-privateassets.md
145-
- name: HTTP warnings promoted to errors in package list and search
146-
href: sdk/10.0/http-warnings-to-errors.md
147145
- name: NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed
148146
href: sdk/10.0/nuget-enhanced-http-retry-removed.md
149147
- name: NuGet logs an error for invalid package IDs
150148
href: sdk/10.0/nuget-packageid-validation.md
149+
- name: PackageReference without a version raises error
150+
href: sdk/10.0/nu1015-packagereference-version.md
151+
- name: PrunePackageReference privatizes direct prunable references
152+
href: sdk/10.0/prune-packagereference-privateassets.md
151153
- name: Windows Forms
152154
items:
153155
- name: API obsoletions

0 commit comments

Comments
 (0)