Skip to content
Merged
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
3 changes: 2 additions & 1 deletion docs/core/compatibility/10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Breaking changes in .NET 10
titleSuffix: ""
description: Navigate to the breaking changes in .NET 10.
ms.date: 03/26/2025
ms.date: 04/03/2025
ai-usage: ai-assisted
no-loc: [Blazor, Razor, Kestrel]
---
Expand Down Expand Up @@ -51,6 +51,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 |
| [Default workload configuration from 'loose manifests' to 'workload sets' mode](sdk/10.0/default-workload-config.md) | Behavioral change | Preview 2 |
| [`dotnet restore` audits transitive packages](sdk/10.0/nugetaudit-transitive-packages.md) | Behavioral change | Preview 3 |
| [MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed](sdk/10.0/custom-build-event-warning.md) | Behavioral change | Preview 1 |
Expand Down
56 changes: 56 additions & 0 deletions docs/core/compatibility/sdk/10.0/dotnet-cli-interactive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: "Breaking change - .NET CLI `--interactive` defaults to `true` in user scenarios"
description: "Learn about the breaking change in .NET 10 Preview 3 where the --interactive flag defaults to true in user-centric scenarios."
ms.date: 4/3/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs/issues/45548
---

# .NET CLI `--interactive` defaults to `true` in user scenarios

The `--interactive` flag for the .NET CLI now defaults to `true` in user-centric scenarios. The behavior remains unchanged for CI/CD environments.

## Version introduced

.NET 10 Preview 3

## Previous behavior

The `--interactive` flag always defaulted to `false` unless explicitly specified by the user.

```bash
dotnet restore --interactive
# Required explicitly to enable interactivity
```

## New behavior

The `--interactive` flag defaults to `true` in user-centric scenarios, such as when commands are run directly by a user. In CI/CD environments or when the process output stream is redirected, the flag defaults to `false`.

```bash
dotnet restore
# Interactivity is enabled by default in user-centric scenarios
```

## Type of breaking change

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

## Reason for change

This change improves the user experience by:

- Simplifying NuGet authentication, addressing a common pain point.
- Providing a unified signal for enabling future CLI interactivity features.

## Recommended action

No action is required for most users. To explicitly disable interactivity, pass the `--interactive false` flag:

```bash
dotnet restore --interactive false
```

## Affected APIs

None.
4 changes: 4 additions & 0 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ items:
href: globalization/10.0/version-override.md
- name: SDK and MSBuild
items:
- name: .NET CLI `--interactive` defaults to `true` in user scenarios
href: sdk/10.0/dotnet-cli-interactive.md
- name: "`dotnet restore` audits transitive packages"
href: sdk/10.0/nugetaudit-transitive-packages.md
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
Expand Down Expand Up @@ -1910,6 +1912,8 @@ items:
items:
- name: .NET 10
items:
- name: .NET CLI `--interactive` defaults to `true` in user scenarios
href: sdk/10.0/dotnet-cli-interactive.md
- name: "`dotnet restore` audits transitive packages"
href: sdk/10.0/nugetaudit-transitive-packages.md
- name: Default workload configuration from 'loose manifests' to 'workload sets' mode
Expand Down