From 96ac7be2cc382b0091d5a9a8b7f34a202564031e Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:14:20 +0200 Subject: [PATCH] Revise NativeAOT deployment dependencies This matches the reality more accurately as zlib is built in-box and ICU is conditional for run-time. --- docs/core/deploying/native-aot/index.md | 53 +++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/docs/core/deploying/native-aot/index.md b/docs/core/deploying/native-aot/index.md index bb07bd14be2d8..bba973f57ae66 100644 --- a/docs/core/deploying/native-aot/index.md +++ b/docs/core/deploying/native-aot/index.md @@ -25,37 +25,82 @@ The Native AOT deployment model uses an ahead-of-time compiler to compile IL to - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. - Alpine (3.15+) + Publish dependencies: + + ```sh + sudo apk add clang build-base icu-dev + ``` + + Run-time dependencies: + ```sh - sudo apk add clang build-base zlib-dev + sudo apk add icu-libs ``` +> [!NOTE] +> The `icu-libs` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. + # [Fedora](#tab/linux-fedora) - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. - Fedora (39+) + Publish dependencies: + + ```sh + sudo dnf install clang libicu-devel + ``` + + Run-time dependencies: + ```sh - sudo dnf install clang zlib-devel zlib-ng-devel zlib-ng-compat-devel + sudo dnf install libicu ``` +> [!NOTE] +> The `libicu` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. + # [RHEL](#tab/linux-rhel) - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. - RHEL (8+) + Publish dependencies: + + ```sh + sudo dnf install clang libicu-devel + ``` + + Run-time dependencies: + ```sh - sudo dnf install clang zlib-devel zlib-ng-devel zlib-ng-compat-devel + sudo dnf install libicu ``` +> [!NOTE] +> The `libicu-devel` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. + # [Ubuntu](#tab/linux-ubuntu) - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. - Ubuntu (18.04+) + Publish dependencies: + + ```sh + sudo apt-get install clang libicu-dev + ``` + + Run-time dependencies: + ```sh - sudo apt-get install clang zlib1g-dev + sudo apt-get install libicuX + # replace X with the available version, e.g. libicu76 ``` +> [!NOTE] +> The `libicu` library is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. + # [macOS](#tab/macOS) The latest [Command Line Tools for XCode](https://developer.apple.com/download/). Supported on .NET 8 and later versions.