Skip to content

Commit 0d3db91

Browse files
Merge pull request #47601 from dotnet/main
Merge main into live
2 parents d586320 + 9665c12 commit 0d3db91

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
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

docs/standard/serialization/binaryformatter-migration-guide/functionality-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The <xref:System.Runtime.Serialization.Formatters.Binary.BinaryFormatter> was fi
2020

2121
## Member names
2222

23-
In most common scenario, the type is annotated with `[Serializable]` and the serializer uses reflection to serialize **all fields** (both public and non-public) except those that are annotated with `[NonSerialized]`. By default, the serialized member names will match the type's field names. This historically led to incompatibilities when even private fields are renamed on `[Serializable]` types. During migrations away from BinaryFormatter, it becomes necessary to understand how serialized field names were handled and overridden.
23+
In the most common scenario, the type is annotated with `[Serializable]` and the serializer uses reflection to serialize **all fields** (both public and non-public) except those that are annotated with `[NonSerialized]`. By default, the serialized member names of public fields will match the type's field names. For non-public fields defined in inherited classes, the member names consist of inherited type name, a `+` sign, and the field name (`$InheritedClassName+$nonPublicFieldName`). Serializing field names has historically led to incompatibilities when even private fields are renamed on `[Serializable]` types. During migrations away from BinaryFormatter, it became necessary to understand how serialized field names were handled and overridden.
2424

2525
### C# auto properties
2626

0 commit comments

Comments
 (0)