From 4433bb91c66d20db3208d7d99571fdbbde513b9a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:17:53 +0000 Subject: [PATCH 1/4] Initial plan From 62ea86e890402e097c82ac8f00b26118ea9af5cb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:24:15 +0000 Subject: [PATCH 2/4] Add breaking change documentation for dotnet watch stderr logging Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- docs/core/compatibility/10.0.md | 1 + .../sdk/10.0/dotnet-watch-stderr.md | 42 +++++++++++++++++++ docs/core/compatibility/toc.yml | 2 + 3 files changed, 45 insertions(+) create mode 100644 docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 7d0c66625293f..4b6af32d6ea7e 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -111,6 +111,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 | | [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 | | [`dotnet tool install --local` creates manifest by default](sdk/10.0/dotnet-tool-install-local-manifest.md) | Behavioral change | Preview 7 | +| [`dotnet watch` logs internal-facing messages to stderr instead of stdout](sdk/10.0/dotnet-watch-stderr.md) | Behavioral change | RC 2 | | [project.json not supported in `dotnet restore`](sdk/10.0/dotnet-restore-project-json-unsupported.md) | Source incompatible | Preview 7 | | [SHA-1 fingerprint support deprecated in `dotnet nuget sign`](sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md) | Behavioral change | Preview 1 | | [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 | diff --git a/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md new file mode 100644 index 0000000000000..b725b6052179f --- /dev/null +++ b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md @@ -0,0 +1,42 @@ +--- +title: "Breaking change: 'dotnet watch' logs internal-facing messages to stderr instead of stdout" +description: "Learn about the breaking change in .NET 10 RC 2 where 'dotnet watch' emits its log messages to stderr instead of stdout." +ms.date: 01/16/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/45871 +--- +# 'dotnet watch' logs internal-facing messages to stderr instead of stdout + +Starting in .NET 10 RC 2, [`dotnet watch`](../../../tools/dotnet-watch.md) emits its own 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, which is often reserved for special semantics when running certain kinds of applications, like LSP or MCP servers. + +## Version introduced + +.NET 10 RC 2 + +## Previous behavior + +Previously, [`dotnet watch`](../../../tools/dotnet-watch.md) emitted log messages to `stdout`. + +## New behavior + +Starting in .NET 10 RC 2, [`dotnet watch`](../../../tools/dotnet-watch.md) emits log messages to `stderr`. + +## Type of breaking change + +This change is a [behavioral change](../../categories.md#behavioral-change). + +## Reason for change + +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. This change was implemented in . In general, the CLI should get out of the way of your applications. + +## Recommended action + +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`: + +```bash +dotnet watch 2>&1 +``` + +## Affected APIs + +None. diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 18c08be85a233..3cb6602c54935 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -128,6 +128,8 @@ items: href: sdk/10.0/dotnet-package-list-restore.md - name: "`dotnet tool install --local` creates manifest by default" href: sdk/10.0/dotnet-tool-install-local-manifest.md + - name: "`dotnet watch` logs internal-facing messages to stderr instead of stdout" + href: sdk/10.0/dotnet-watch-stderr.md - name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed href: sdk/10.0/custom-build-event-warning.md - name: MSBuild custom culture resource handling From 596fa1d45df8de80d3e0e225a0d09cf30c4c5842 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 8 Oct 2025 15:38:32 -0700 Subject: [PATCH 3/4] human edits --- docs/core/compatibility/10.0.md | 2 +- .../sdk/10.0/dotnet-watch-stderr.md | 20 ++++++++----------- docs/core/compatibility/toc.yml | 14 ++++++------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index 4b6af32d6ea7e..9a6dc926e90d3 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -111,7 +111,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [`dotnet package list` performs restore](sdk/10.0/dotnet-package-list-restore.md) | Behavioral change | Preview 4 | | [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 | | [`dotnet tool install --local` creates manifest by default](sdk/10.0/dotnet-tool-install-local-manifest.md) | Behavioral change | Preview 7 | -| [`dotnet watch` logs internal-facing messages to stderr instead of stdout](sdk/10.0/dotnet-watch-stderr.md) | Behavioral change | RC 2 | +| [`dotnet watch` logs to stderr instead of stdout](sdk/10.0/dotnet-watch-stderr.md) | Behavioral change | RC 2 | | [project.json not supported in `dotnet restore`](sdk/10.0/dotnet-restore-project-json-unsupported.md) | Source incompatible | Preview 7 | | [SHA-1 fingerprint support deprecated in `dotnet nuget sign`](sdk/10.0/dotnet-nuget-sign-sha1-deprecated.md) | Behavioral change | Preview 1 | | [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 | diff --git a/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md index b725b6052179f..5afa259cd11a6 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md @@ -1,13 +1,13 @@ --- -title: "Breaking change: 'dotnet watch' logs internal-facing messages to stderr instead of stdout" -description: "Learn about the breaking change in .NET 10 RC 2 where 'dotnet watch' emits its log messages to stderr instead of stdout." -ms.date: 01/16/2025 +title: "Breaking change: 'dotnet watch' logs to stderr instead of stdout" +description: "Learn about the breaking change in .NET 10 where 'dotnet watch' emits its internal-facing log messages to stderr instead of stdout." +ms.date: 10/08/2025 ai-usage: ai-assisted ms.custom: https://github.com/dotnet/docs/issues/45871 --- -# 'dotnet watch' logs internal-facing messages to stderr instead of stdout +# 'dotnet watch' logs to stderr instead of stdout -Starting in .NET 10 RC 2, [`dotnet watch`](../../../tools/dotnet-watch.md) emits its own 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, which is often reserved for special semantics when running certain kinds of applications, like LSP or MCP servers. +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. ## Version introduced @@ -19,7 +19,7 @@ Previously, [`dotnet watch`](../../../tools/dotnet-watch.md) emitted log message ## New behavior -Starting in .NET 10 RC 2, [`dotnet watch`](../../../tools/dotnet-watch.md) emits log messages to `stderr`. +Starting in .NET 10, [`dotnet watch`](../../../tools/dotnet-watch.md) emits log messages to `stderr`. ## Type of breaking change @@ -27,15 +27,11 @@ This change is a [behavioral change](../../categories.md#behavioral-change). ## Reason for change -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. This change was implemented in . In general, the CLI should get out of the way of your applications. +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. ## Recommended action -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`: - -```bash -dotnet watch 2>&1 -``` +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` ## Affected APIs diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 3cb6602c54935..05dd72ac5d585 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -128,8 +128,10 @@ items: href: sdk/10.0/dotnet-package-list-restore.md - name: "`dotnet tool install --local` creates manifest by default" href: sdk/10.0/dotnet-tool-install-local-manifest.md - - name: "`dotnet watch` logs internal-facing messages to stderr instead of stdout" + - name: "`dotnet watch` logs to stderr instead of stdout" href: sdk/10.0/dotnet-watch-stderr.md + - name: HTTP warnings promoted to errors in package list and search + href: sdk/10.0/http-warnings-to-errors.md - name: MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed href: sdk/10.0/custom-build-event-warning.md - name: MSBuild custom culture resource handling @@ -138,16 +140,14 @@ items: href: sdk/10.0/nu1510-pruned-references.md - name: NuGet packages with no runtime assets aren't included in deps.json href: sdk/10.0/deps-json-trimmed-packages.md - - name: PackageReference without a version raises error - href: sdk/10.0/nu1015-packagereference-version.md - - name: PrunePackageReference privatizes direct prunable references - href: sdk/10.0/prune-packagereference-privateassets.md - - name: HTTP warnings promoted to errors in package list and search - href: sdk/10.0/http-warnings-to-errors.md - name: NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed href: sdk/10.0/nuget-enhanced-http-retry-removed.md - name: NuGet logs an error for invalid package IDs href: sdk/10.0/nuget-packageid-validation.md + - name: PackageReference without a version raises error + href: sdk/10.0/nu1015-packagereference-version.md + - name: PrunePackageReference privatizes direct prunable references + href: sdk/10.0/prune-packagereference-privateassets.md - name: Windows Forms items: - name: API obsoletions From 75b84f16927390899fb3ed5649532ed2a5ed750c Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Wed, 8 Oct 2025 15:42:31 -0700 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md index 5afa259cd11a6..36217be0f31fb 100644 --- a/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md +++ b/docs/core/compatibility/sdk/10.0/dotnet-watch-stderr.md @@ -2,7 +2,7 @@ title: "Breaking change: 'dotnet watch' logs to stderr instead of stdout" description: "Learn about the breaking change in .NET 10 where 'dotnet watch' emits its internal-facing log messages to stderr instead of stdout." ms.date: 10/08/2025 -ai-usage: ai-assisted +ai-usage: ai-generated ms.custom: https://github.com/dotnet/docs/issues/45871 --- # 'dotnet watch' logs to stderr instead of stdout @@ -31,7 +31,7 @@ This change is part of a general trend towards `dotnet` CLI commands not obscuri ## Recommended action -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` +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`. ## Affected APIs