Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/core/compatibility/10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
| Title | Type of change | Introduced version |
|-------|-------------------|--------------------|
| [.NET CLI `--interactive` defaults to `true` in user scenarios](sdk/10.0/dotnet-cli-interactive.md) | Behavioral change | Preview 3 |
| [`dotnet` CLI commands log non-command-relevant data to stderr](sdk/10.0/dotnet-cli-stderr-output.md) | Behavioral change | RC 2 |
| [.NET tool packaging creates RuntimeIdentifier-specific tool packages](sdk/10.0/dotnet-tool-pack-publish.md) | Behavioral change | Preview 6 |
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
| [`dotnet new sln` defaults to SLNX file format](sdk/10.0/dotnet-new-sln-slnx-default.md) | Behavioral change | RC 1 |
Expand Down
41 changes: 41 additions & 0 deletions docs/core/compatibility/sdk/10.0/dotnet-cli-stderr-output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Breaking change - dotnet CLI commands log non-command-relevant data to stderr"
description: "Learn about the breaking change in .NET 10 where some dotnet CLI commands log verbose and non-command-relevant data to stderr instead of stdout."
ms.date: 10/08/2025
ai-usage: ai-generated
ms.custom: https://dev.azure.com/msft-skilling/Content/_workitems/edit/494515
---

# dotnet CLI commands log non-command-relevant data to stderr

Starting in .NET 10, some `dotnet` CLI command output that isn't core to the command being invoked emits to `stderr` instead of `stdout`.

## Version introduced

.NET 10 RC 2

## Previous behavior

Previously, first-run messages for the `dotnet` CLI emitted to `stdout`.

## New behavior

Starting in .NET 10, first-run messages for the `dotnet` CLI emit to `stderr`. (In the future, more messages will undergo a similar change.)

## Type of breaking change

This change is a [behavioral change](../../categories.md#behavioral-change).

## Reason for change

Information that's written to `stdout` that isn't directly related to the command being invoked inhibits the use of commands in scripting or noninteractive circumstances. When non-primary outputs like diagnostics, verbose messages, and incidental notifications are moved to `stderr`, `stdout` remains clean for parsing or other interpretation.

## Recommended action

For most non-PowerShell users, this change shouldn't require any action.

For PowerShell users, we recommend using at least PowerShell version 7.2, where redirecting to `stderr` doesn't set PowerShell's `$Error` variable and cause PowerShell to think the previous command failed execution.

## Affected APIs

None.
2 changes: 2 additions & 0 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ items:
items:
- name: .NET CLI `--interactive` defaults to `true` in user scenarios
href: sdk/10.0/dotnet-cli-interactive.md
- name: "`dotnet` CLI commands log non-command-relevant data to stderr"
href: sdk/10.0/dotnet-cli-stderr-output.md
- name: .NET tool packaging creates RuntimeIdentifier-specific tool packages
href: sdk/10.0/dotnet-tool-pack-publish.md
- name: "`dotnet restore` audits transitive packages"
Expand Down
5 changes: 4 additions & 1 deletion docs/core/tools/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ A single telemetry entry is also sent by the .NET SDK installer when a successfu

## Disclosure

The .NET SDK displays text similar to the following when you first run one of the [.NET CLI commands](index.md) (for example, `dotnet build`). Text may vary slightly depending on the version of the SDK you're running. This "first run" experience is how Microsoft notifies you about data collection.
The .NET SDK displays text similar to the following when you first run one of the [.NET CLI commands](index.md) (for example, `dotnet build`). Text might vary slightly depending on the version of the SDK you're running. This "first run" experience is how Microsoft notifies you about data collection.

> [!NOTE]
> **Breaking change:** The behavior of telemetry messages written to `stderr` has changed in recent versions of the .NET SDK. For more information, see the [breaking change documentation](/dotnet/core/compatibility/sdk/8.0/telemetry-stderr-behavior).

```console
Telemetry
Expand Down