Document DOTNET_CLI_ENABLEAOT environment variable#54649
Open
baronfel wants to merge 5 commits into
Open
Conversation
Adds the DOTNET_CLI_ENABLEAOT variable (NativeAOT CLI command-handling fast path, enabled by default) to the .NET SDK and CLI environment variables reference. Fixes #54648
Contributor
There was a problem hiding this comment.
Pull request overview
This PR documents the DOTNET_CLI_ENABLEAOT environment variable in the .NET SDK/CLI environment variables reference, describing how it controls the NativeAOT-based CLI fast path and its default behavior.
Changes:
- Adds
DOTNET_CLI_ENABLEAOTto the .NET SDK and CLI environment variables list. - Introduces a new section that explains the variable’s purpose, default enabled state, and accepted enable/disable values.
Comment on lines
+330
to
+332
| Specifies whether the .NET SDK uses its native (ahead-of-time compiled) CLI command-handling fast path. When enabled, common commands (such as command parsing, `dotnet --version`, and `dotnet --info`) are handled by a native entry point for faster startup, transparently falling back to the managed CLI for anything the fast path doesn't handle. | ||
|
|
||
| This fast path is enabled by default. To opt out and route every invocation to the managed CLI, set this variable to `false`, `0`, `no`, or `off`. To explicitly enable it, set it to `true`, `1`, `yes`, or `on`, or leave it unset. |
Member
Author
There was a problem hiding this comment.
Addressed in 3fcddf8: the default is now stated separately in a Note, enable/disable values are listed symmetrically as their own bullets, and command parsing is now command-line parsing.
The fast path is disabled by default on macOS pending dotnet/command-line-api#2812.
…locked by command-line-api#2812)
BillWagner
approved these changes
Jul 6, 2026
BillWagner
left a comment
Member
There was a problem hiding this comment.
This LGTM @baronfel
I had one question for you to decide on, and then this is ready to merge.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Documents the
DOTNET_CLI_ENABLEAOTenvironment variable in the .NET SDK and CLI environment variables reference.Starting with the .NET SDK preview that resolves dotnet/sdk#55078, the SDK''s NativeAOT-compiled CLI command-handling fast path is enabled by default. This adds a reference entry describing its purpose, the enabled-by-default behavior, and the accepted opt-out values (
false/0/no/off).Fixes #54648
Internal previews