Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
The effective rule is: if the .NET 10-specific RemovePreviousVersion value exists, it takes precedence over All; if it is absent, the global All value is used; whichever selected value is invalid resolves to always.
Published documentation
The Windows installation guide documents both registry locations and the value normalization rules:
| .NET version | Registry key | Name | Type | Value |
| All |HKLM\SOFTWARE\Microsoft\.NET|RemovePreviousVersion|REG_SZ|always,never, ornextSession|
| .NET 10 |HKLM\SOFTWARE\Microsoft\.NET\10.0|RemovePreviousVersion|REG_SZ|always,never, ornextSession|
It then states:
alwaysremoves previous installations after the new version is installed. This is the default behavior in .NET.
and:
Values are case-insensitive and invalid values default to
always.
The feature applies only to standalone installer executables and is available starting with .NET 8 servicing release 8.0.11.^1^
However, that published article does not currently state the precedence or fallback rule between the global and version-specific entries. Therefore, precedence is not established by that article alone.
Precedence established by implementation work
The change that introduced the registry searches states explicitly:
The search operation will check for a global and version specific registry key. The version specific key takes precedence when present.
That wording is in Arcade PR #14975.^2^
The installer policy source implements separate searches for:
- the global value under
SOFTWARE\Microsoft\.NET; - existence of the version-specific value under
SOFTWARE\Microsoft\.NET\<major>.<minor>; - the version-specific value, conditionally searched when that entry exists.^3^
Consequently, the decision table for a .NET 10 standalone installer is:
.NET\10.0 entry |
Global All entry |
Effective input | Effective behavior |
|---|---|---|---|
| Present and valid | Any value or absent | Version-specific value | always, never, or nextSession |
| Present but invalid | Valid or absent | Invalid version-specific value | always |
| Absent | Present and valid | Global value | Global setting |
| Absent | Present but invalid | Invalid global value | always |
| Absent | Absent | Default | always |
The important distinction is that fallback is based on presence, not validity. An invalid .NET 10 value is still the selected version-specific value; it does not fall back to All. The documented invalid-value rule then converts it to always.
Contract status
- Published contract: accepted values are case-insensitive; invalid values and the default resolve to
always; the global and per-version locations are supported. - Implementation-defined/documented in the introducing PR: a present version-specific entry overrides the global entry.
- Documentation gap: the Learn article does not expressly say that absence triggers global fallback while an invalid version-specific value does not.
A documentation clarification could state:
The version-specific
RemovePreviousVersionvalue takes precedence when present. If it is absent, the value underHKLM\SOFTWARE\Microsoft\.NETis used. After selecting the applicable value, values are evaluated case-insensitively, and an invalid or unavailable value defaults toalways.
References