Repository navigation
Add breaking change: NativeAOT CLI command handling enabled by default #55223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
gewarren
merged 3 commits into
main
from
copilot/breaking-change-nativeaot-cli-command-handling
Aug 4, 2026
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
docs/core/compatibility/sdk/11/native-cli-command-handling-enabled.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| title: "Breaking change: NativeAOT CLI command handling enabled by default" | ||
| description: "Learn about the breaking change in .NET 11 where the NativeAOT-compiled command-handling fast path for the dotnet CLI is enabled by default on all platforms." | ||
| ms.date: 08/04/2026 | ||
| ai-usage: ai-assisted | ||
| --- | ||
|
|
||
| # NativeAOT CLI command handling enabled by default | ||
|
|
||
| Starting in .NET 11 Preview 7, the .NET SDK CLI enables its NativeAOT-compiled command-handling fast path by default on all platforms. This path is controlled by the `DOTNET_CLI_ENABLEAOT` environment variable, whose default changes from disabled to enabled. Common `dotnet` invocations, such as command-line parsing, `--version`, `--info`, and a growing set of built-in and external commands, are handled by a native entry point that transparently falls back to the managed CLI for anything it doesn't handle. | ||
|
|
||
| ## Version introduced | ||
|
|
||
| .NET 11 Preview 7 | ||
|
|
||
| ## Previous behavior | ||
|
|
||
| Previously, the NativeAOT CLI fast path was off by default on all platforms. Unless `DOTNET_CLI_ENABLEAOT` was explicitly set to a truthy value (`true`, `1`, `yes`, or `on`), every `dotnet` invocation was handled by the managed CLI. | ||
|
|
||
| ## New behavior | ||
|
|
||
| Starting in .NET 11, the NativeAOT CLI fast path is on by default on all platforms (Windows, macOS, and Linux). Supported commands are handled natively, and anything unsupported transparently falls back to the managed CLI. To opt out and route every invocation to the managed CLI, set `DOTNET_CLI_ENABLEAOT` to a falsy value: `false`, `0`, `no`, or `off`. | ||
|
|
||
| ## Type of breaking change | ||
|
|
||
| This change is a [behavioral change](../../categories.md#behavioral-change). | ||
|
|
||
| ## Reason for change | ||
|
|
||
| Now that the native command-handling path has reached parity with the managed CLI, enabling it by default provides broad real-world testing and improves CLI startup performance for common commands. | ||
|
|
||
| ## Recommended action | ||
|
|
||
| The native path is designed to be behaviorally identical to the managed CLI and should require no action. If you observe a difference in behavior, set the environment variable `DOTNET_CLI_ENABLEAOT=false` (or `0`, `no`, or `off`) to opt out and route all invocations to the managed CLI. Report the difference at <https://github.com/dotnet/sdk/issues>. | ||
|
|
||
| ## Affected APIs | ||
|
|
||
| None. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.