Skip to content

Commit 11e4b10

Browse files
Youssef1313elinor-fungnohwndgewarren
authored
Clarify DOTNET_ROOT documentation (#47059)
* Clarify DOTNET_ROOT documentation * Reword * Update docs/core/tools/dotnet-environment-variables.md Co-authored-by: Elinor Fung <[email protected]> * Update docs/core/tools/dotnet-environment-variables.md Co-authored-by: Jakub Jareš <[email protected]> * Update docs/core/tools/dotnet-environment-variables.md Co-authored-by: Elinor Fung <[email protected]> * Update dotnet-environment-variables.md * Update dotnet-environment-variables.md * Update docs/core/tools/dotnet-environment-variables.md * Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <[email protected]> * Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <[email protected]> * Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <[email protected]> * Apply suggestion from @gewarren Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Elinor Fung <[email protected]> Co-authored-by: Jakub Jareš <[email protected]> Co-authored-by: Genevieve Warren <[email protected]>
1 parent 0ba2191 commit 11e4b10

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/core/tools/dotnet-environment-variables.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,15 @@ Specifies the location of the .NET runtimes, if they are not installed in the de
199199
- GitHub issue [dotnet/core#7699](https://github.com/dotnet/core/issues/7699)
200200
- GitHub issue [dotnet/runtime#79237](https://github.com/dotnet/runtime/issues/79237)
201201

202-
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.
202+
These environment variables are used only when running apps via generated executables (apphosts). The order in which the environment variables are considered is:
203+
204+
1. `DOTNET_ROOT_<ARCH>`, where `<ARCH>` is the architecture of the running executable (apphost).
205+
For example:
206+
- `DOTNET_ROOT_ARM64` is used for an Arm64 process.
207+
- `DOTNET_ROOT_X64` is used for an x64 process. This process might be running on x64 or Arm64 architecture.
208+
- `DOTNET_ROOT_X86` is used for an x86 process. This process might be running on x86 or x64 architecture.
209+
2. `DOTNET_ROOT(x86)` is used when a 32-bit process is running on 64-bit Windows. In other cases, this environment variable is ignored.
210+
3. `DOTNET_ROOT`.
203211

204212
### `DOTNET_HOST_PATH`
205213

0 commit comments

Comments
 (0)