Summary
Starting with the .NET SDK preview that resolves dotnet/sdk#55078, the SDK ships a NativeAOT-compiled CLI entry point that handles common dotnet commands (parsing, --version, --info, and a growing set of built-in/external commands) on a fast native path, transparently falling back to the managed CLI for anything it does not handle.
This fast path is controlled by the DOTNET_CLI_ENABLEAOT environment variable, and it is now enabled by default. Users who need to bypass it (for example, to diagnose a suspected behavioral difference) can opt out by setting the variable to a falsy value.
This variable is not currently documented in the dotnet environment variables reference.
Requested documentation
Add a DOTNET_CLI_ENABLEAOT entry to docs/core/tools/dotnet-environment-variables.md covering:
- Purpose: enables/disables the NativeAOT CLI command-handling fast path.
- Default: enabled.
- Accepted values:
- Enable (default): unset, or
true / 1 / yes / on
- Disable (opt out):
false / 0 / no / off
- Behavior when disabled: every invocation is routed to the managed CLI, matching pre-default behavior.
References
Summary
Starting with the .NET SDK preview that resolves dotnet/sdk#55078, the SDK ships a NativeAOT-compiled CLI entry point that handles common
dotnetcommands (parsing,--version,--info, and a growing set of built-in/external commands) on a fast native path, transparently falling back to the managed CLI for anything it does not handle.This fast path is controlled by the
DOTNET_CLI_ENABLEAOTenvironment variable, and it is now enabled by default. Users who need to bypass it (for example, to diagnose a suspected behavioral difference) can opt out by setting the variable to a falsy value.This variable is not currently documented in the dotnet environment variables reference.
Requested documentation
Add a
DOTNET_CLI_ENABLEAOTentry todocs/core/tools/dotnet-environment-variables.mdcovering:true/1/yes/onfalse/0/no/offReferences
src/Cli/dotnet-aot/DESIGN.mdin dotnet/sdk