From 15c59752b8a3effc19c2329fc9a8c64916505ecb Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 2 Jul 2025 12:23:21 +0200 Subject: [PATCH 1/8] Clarify DOTNET_ROOT documentation --- docs/core/tools/dotnet-environment-variables.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index 6b785293e23e6..b44ff6a6f2220 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -199,7 +199,10 @@ Specifies the location of the .NET runtimes, if they are not installed in the de - GitHub issue [dotnet/core#7699](https://github.com/dotnet/core/issues/7699) - GitHub issue [dotnet/runtime#79237](https://github.com/dotnet/runtime/issues/79237) -This environment variable is used only when running apps via generated executables (apphosts). `DOTNET_ROOT(x86)` is used instead when running a 32-bit executable on a 64-bit OS. `DOTNET_ROOT_X64` is used instead when running a 64-bit executable on an ARM64 OS. +This environment variable is used only when running apps via generated executables (apphosts). + +- If running 64-bit executable on either ARM64 OS or 64-bit OS, `DOTNET_ROOT_X64` is used first, and if not set, `DOTNET_ROOT` is used instead. +- If running 32-bit executable on either 64-bit OS or 32-bit OS, `DOTNET_ROOT_X86` is used first. Then, `DOTNET_ROOT(x86)` is considered only under 64-bit OS. Then, `DOTNET_ROOT` is used. ### `DOTNET_HOST_PATH` From 74925ab775fdca1a25be0354f7455348d61dc2a2 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 2 Jul 2025 12:52:45 +0200 Subject: [PATCH 2/8] Reword --- docs/core/tools/dotnet-environment-variables.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index b44ff6a6f2220..e51c2a2ef0018 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -199,10 +199,12 @@ Specifies the location of the .NET runtimes, if they are not installed in the de - GitHub issue [dotnet/core#7699](https://github.com/dotnet/core/issues/7699) - GitHub issue [dotnet/runtime#79237](https://github.com/dotnet/runtime/issues/79237) -This environment variable is used only when running apps via generated executables (apphosts). +These environment variables are used only when running apps via generated executables (apphosts). The order in which the environment variables are considered is: -- If running 64-bit executable on either ARM64 OS or 64-bit OS, `DOTNET_ROOT_X64` is used first, and if not set, `DOTNET_ROOT` is used instead. -- If running 32-bit executable on either 64-bit OS or 32-bit OS, `DOTNET_ROOT_X86` is used first. Then, `DOTNET_ROOT(x86)` is considered only under 64-bit OS. Then, `DOTNET_ROOT` is used. +1. `DOTNET_ROOT_`, where `` is the architecture of the running executable (apphost). + - For example, if running 64-bit executable on ARM64 OS or 64-bit OS, `DOTNET_ROOT_X64` is used. +2. If running 32-bit executable on 64-bit OS, `DOTNET_ROOT(x86)` is considered. +3. `DOTNET_ROOT` is used as a fallback. ### `DOTNET_HOST_PATH` From f873577fd229381706395061dd2c579e5956b3a9 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 3 Jul 2025 00:15:01 +0200 Subject: [PATCH 3/8] Update docs/core/tools/dotnet-environment-variables.md Co-authored-by: Elinor Fung --- docs/core/tools/dotnet-environment-variables.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index e51c2a2ef0018..eb6efd7c7ff50 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -202,7 +202,10 @@ Specifies the location of the .NET runtimes, if they are not installed in the de These environment variables are used only when running apps via generated executables (apphosts). The order in which the environment variables are considered is: 1. `DOTNET_ROOT_`, where `` is the architecture of the running executable (apphost). - - For example, if running 64-bit executable on ARM64 OS or 64-bit OS, `DOTNET_ROOT_X64` is used. + - For example: + - `DOTNET_ROOT_ARM64` is used for an arm64 process + - `DOTNET_ROOT_X64` is used for an x64 process. This may be running on x64 or arm64 architecture. + - `DOTNET_ROOT_X86` is used for an x86 process. This may be running on x86 or x64 architecture. 2. If running 32-bit executable on 64-bit OS, `DOTNET_ROOT(x86)` is considered. 3. `DOTNET_ROOT` is used as a fallback. From 976085dc55bf6fad7669385993f47c8306bb8711 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 3 Jul 2025 00:15:29 +0200 Subject: [PATCH 4/8] Update docs/core/tools/dotnet-environment-variables.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jakub Jareš --- docs/core/tools/dotnet-environment-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index eb6efd7c7ff50..64c70390e3206 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -206,7 +206,7 @@ These environment variables are used only when running apps via generated execut - `DOTNET_ROOT_ARM64` is used for an arm64 process - `DOTNET_ROOT_X64` is used for an x64 process. This may be running on x64 or arm64 architecture. - `DOTNET_ROOT_X86` is used for an x86 process. This may be running on x86 or x64 architecture. -2. If running 32-bit executable on 64-bit OS, `DOTNET_ROOT(x86)` is considered. +2. `DOTNET_ROOT(x86)` is used when running 32-bit process on 64-bit Windows. In other cases this environment variable is ignored. 3. `DOTNET_ROOT` is used as a fallback. ### `DOTNET_HOST_PATH` From d102dca30d3f0ce64000c1ecc5e86c1cb8bed261 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 3 Jul 2025 00:15:37 +0200 Subject: [PATCH 5/8] Update docs/core/tools/dotnet-environment-variables.md Co-authored-by: Elinor Fung --- docs/core/tools/dotnet-environment-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index 64c70390e3206..f95624e7c3695 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -207,7 +207,7 @@ These environment variables are used only when running apps via generated execut - `DOTNET_ROOT_X64` is used for an x64 process. This may be running on x64 or arm64 architecture. - `DOTNET_ROOT_X86` is used for an x86 process. This may be running on x86 or x64 architecture. 2. `DOTNET_ROOT(x86)` is used when running 32-bit process on 64-bit Windows. In other cases this environment variable is ignored. -3. `DOTNET_ROOT` is used as a fallback. +3. `DOTNET_ROOT` ### `DOTNET_HOST_PATH` From 39f75efab648b8b255aac5384925d396b57f5829 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 3 Jul 2025 00:16:37 +0200 Subject: [PATCH 6/8] Update dotnet-environment-variables.md --- docs/core/tools/dotnet-environment-variables.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index f95624e7c3695..aecd32742fbbb 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -203,9 +203,9 @@ These environment variables are used only when running apps via generated execut 1. `DOTNET_ROOT_`, where `` is the architecture of the running executable (apphost). - For example: - - `DOTNET_ROOT_ARM64` is used for an arm64 process - - `DOTNET_ROOT_X64` is used for an x64 process. This may be running on x64 or arm64 architecture. - - `DOTNET_ROOT_X86` is used for an x86 process. This may be running on x86 or x64 architecture. + - `DOTNET_ROOT_ARM64` is used for an arm64 process + - `DOTNET_ROOT_X64` is used for an x64 process. This may be running on x64 or arm64 architecture. + - `DOTNET_ROOT_X86` is used for an x86 process. This may be running on x86 or x64 architecture. 2. `DOTNET_ROOT(x86)` is used when running 32-bit process on 64-bit Windows. In other cases this environment variable is ignored. 3. `DOTNET_ROOT` From 8c44ae44d673f56cbfabf18aa960dfce2cb31bf9 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 3 Jul 2025 00:17:01 +0200 Subject: [PATCH 7/8] Update dotnet-environment-variables.md --- docs/core/tools/dotnet-environment-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index aecd32742fbbb..0677dc9870878 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -203,7 +203,7 @@ These environment variables are used only when running apps via generated execut 1. `DOTNET_ROOT_`, where `` is the architecture of the running executable (apphost). - For example: - - `DOTNET_ROOT_ARM64` is used for an arm64 process + - `DOTNET_ROOT_ARM64` is used for an arm64 process. - `DOTNET_ROOT_X64` is used for an x64 process. This may be running on x64 or arm64 architecture. - `DOTNET_ROOT_X86` is used for an x86 process. This may be running on x86 or x64 architecture. 2. `DOTNET_ROOT(x86)` is used when running 32-bit process on 64-bit Windows. In other cases this environment variable is ignored. From bae9a0072825c0b00fe3451053ca3f1c4104ef4e Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Thu, 3 Jul 2025 00:19:11 +0200 Subject: [PATCH 8/8] Update docs/core/tools/dotnet-environment-variables.md --- docs/core/tools/dotnet-environment-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/tools/dotnet-environment-variables.md b/docs/core/tools/dotnet-environment-variables.md index 0677dc9870878..3352b68543109 100644 --- a/docs/core/tools/dotnet-environment-variables.md +++ b/docs/core/tools/dotnet-environment-variables.md @@ -202,7 +202,7 @@ Specifies the location of the .NET runtimes, if they are not installed in the de These environment variables are used only when running apps via generated executables (apphosts). The order in which the environment variables are considered is: 1. `DOTNET_ROOT_`, where `` is the architecture of the running executable (apphost). - - For example: + - For example: - `DOTNET_ROOT_ARM64` is used for an arm64 process. - `DOTNET_ROOT_X64` is used for an x64 process. This may be running on x64 or arm64 architecture. - `DOTNET_ROOT_X86` is used for an x86 process. This may be running on x86 or x64 architecture.