Skip to content

[Breaking change]: 32-bit .NET host will not be added to PATH on 64-bit Windows platforms #29740

@NikolaMilosavljevic

Description

@NikolaMilosavljevic

Description

We are modifying the code in x86 version of .NET Windows Installers, that adds x86 host location to the PATH - Program Files (x86)\dotnet. Going forward, x86 host path will not be added on 64-bit Windows systems.

See pending PR for the actual change in .NET 7: dotnet/runtime#69902

This will be backported, and will affect, .NET 6 and .NET Core 3.1, as well.

Version

.NET 7 Preview 6

Previous behavior

X86 host location will be added to PATH, even on x64/arm64 systems. Depending on which .NET architecture installer is run first, user's machine could have either native (x64/arm64) or x86 host as first in the PATH list.

New behavior

Going forward, x86 host location will only be added to the PATH on x86 systems.

Customers that need x86 host in the PATH on x64/arm64 systems need to add host location to the PATH manually.

This will affect .NET Core 3.1, .NET 6, .NET 7, and future versions.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
  • Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.

Reason for change

Currently, x86 host will be added to PATH, even on x64/arm64 systems. Depending on which .NET architecture installer is run first, user's machine could have either native (x64/arm64) or x86 host as first in the PATH list.

This presents problems with initial .NET installation, and gets further complicated during .NET servicing events. Any of these installation scenarios could modify the order of .NET hosts in PATH.

The experience is non-deterministic, and has a high chance of regressing user's .NET runtime experience.

This change streamlines .NET host experience on Windows 64-bit systems. Only 64-bit hosts will be available in system PATH - x64 host on x64 system and arm64 host on arm64 systems.

As a result, we remove the ambiguity of order of .NET hosts in system PATH - only one host will be in the PATH.

Recommended action

Customers that need x86 host in the PATH on x64/arm64 systems need to add the host location to the PATH manually.

Feature area

Deployment

Affected APIs

No response

Metadata

Metadata

Assignees

Labels

🏁 Release: .NET 7Work items for the .NET 7 releasebreaking-changeIndicates a .NET Core breaking change

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions