Skip to content

Document DOTNET_CLI_ENABLEAOT environment variable (NativeAOT CLI fast path, enabled by default) #54648

Description

@baronfel

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions