Skip to content

[release/11.0.1xx] Restore localized first-run messages in the NativeAOT CLI - #56599

Merged
JeremyKuhne merged 1 commit into
dotnet:release/11.0.1xxfrom
JeremyKuhne:backport-55781-release-11.0.1xx
Oct 12, 2026
Merged

JeremyKuhne merged 1 commit into
dotnet:release/11.0.1xxfrom
JeremyKuhne:backport-55781-release-11.0.1xx

Conversation

@JeremyKuhne

@JeremyKuhne JeremyKuhne commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Backport of #55781 to release/11.0.1xx.

Cherry-picked squash commit 57066b1f1e885b1d84aa766c4b2a14def4500cc0 with -x.

Validation

  • Focused dotnet-aot.Tests regression: 2 passed, 0 failed, 0 skipped
  • Clean dotnet-aot and dotnet-aot.Tests builds: succeeded with 0 warnings
  • NativeAOT product publish (win-x64, Debug): succeeded
  • Full Debug SDK build: succeeded with 0 warnings
  • Focused redist-backed dotnet.Tests integration test: 1 passed, 0 failed, 0 skipped

Tactics

Summary

The .NET 11 NativeAOT CLI handled first-run setup itself, so the welcome, telemetry and certificate messages appeared in English on localized systems while later command output was localized. The fix (backport of #55781, fixing #55744) detects the effective UI culture, including CLI language overrides, in NativeEntryPoint.cs. For non-English first runs it defers to the managed CLI before any sentinel or setup state is written. English and subsequent runs keep the NativeAOT fast path. The change is small and targeted, so it suits servicing.

Customer Impact

Users of the .NET 11 NativeAOT dotnet CLI on non-English systems (for example German Windows) see unlocalized first-run messages. The messages are displayed but in the wrong language. No workaround is stated in the PR. Only the first invocation is affected.

Regression?

Yes. It affects the .NET 11 NativeAOT CLI, which printed first-run messages in English where the managed CLI localized them. The specific introducing PR is not identified in the available context.

Testing

  • New NativeEntryPointTests in dotnet-aot.Tests verify a German first run emits localized welcome and telemetry text. 2 tests passed.
  • A new redist-backed dotnet.Tests integration test in GivenThatTheUserIsRunningDotNetForTheFirstTime passed.
  • Clean dotnet-aot and test builds, the NativeAOT publish (win-x64, Debug) and the full Debug SDK build succeeded with 0 warnings.
  • CI pipelines were started. Results are not reported in the PR.

Risk

Low. The change is about 125 added lines across 6 files, mostly tests and design docs, with a 5-line change in the entry point and some build-props additions. It only affects first-run routing for non-English cultures. The English fast path is unchanged. The main edge case is culture detection, which the tests cover.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: nagilson <[email protected]>
Co-authored-by: Jeremy Kuhne <[email protected]>
Co-authored-by: Marc Paine <[email protected]>
(cherry picked from commit 57066b1)
Copilot AI balanced review requested due to automatic review settings October 12, 2026 17:25
@JeremyKuhne
JeremyKuhne requested a review from a team as a code owner October 12, 2026 17:25
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused backport matches the approved upstream change and includes native-image and integration regression coverage.

0 open findings

What changed in this PR

Backports NativeAOT CLI localization support for first-run messages.

Changes:

  • Applies managed CLI language and encoding setup in NativeAOT.
  • Embeds Configurer satellite assemblies into the native image.
  • Adds localized unit and end-to-end regression coverage.
File Description
src/​Cli/​dotnet-aot/​NativeEntryPoint.cs Initializes UI language before resource access.
src/​Cli/​dotnet-aot/​AotSourceFiles.props Includes encoding-restoration source.
src/​Cli/​dotnet-aot/​AotDependencies.props Supplies Configurer satellites to ILC.
src/​Cli/​dotnet-aot/​DESIGN.md Documents localized first-run behavior.
test/​dotnet-aot.Tests/​NativeEntryPointTests.cs Tests localized NativeAOT execution.
test/​dotnet.Tests/​GivenThatTheUserIsRunningDotNetForTheFirstTime.cs Adds redist-backed German localization coverage.

🧠 Review effort: Balanced

@marcpopMSFT

Copy link
Copy Markdown
Member

/tactics

@JeremyKuhne
JeremyKuhne merged commit 1ee9636 into dotnet:release/11.0.1xx Oct 12, 2026
27 checks passed
@rbhanda rbhanda added this to the 11.0.0 milestone Oct 12, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — 032a8ae1 Deployed Oct 12, 2026 by JeremyKuhne via pre_activation #8776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants