dotnet / dotnet/sdk

`dotnetup` in `FullReplacement` mode breaks x86 apps

Open Beginner friendly
#54,865 3 comments 2 reactions 0 assignees View on GitHub
Area-dotnetup Priority:1
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Prerequisites

- [x] I have read the [dotnetup documentation](https://github.com/dotnet/sdk/tree/release/dnup/documentation/general/dotnetup).
- [x] I have searched for [existing dotnetup issues](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3Adotnetup).
- [x] I have searched for [existing dotnetup discussions](https://github.com/dotnet/sdk/discussions/categories/dotnetup).

### Issue type

Bug report

### Description

`dotnetup` sets `DOTNET_ROOT` making x86 apps to incorrectly load x64 `hostfxr.dll`.

This is easily fixable by setting `DOTNET_ROOT(X86)` to `C:\Program Files (x86)\dotnet` to direct x86 apps to load the correct `hostfxr.dll`.

### dotnetup version

0.1.4-preview.6.26316.3+959e393d619d6ec339be99d8b8c7ed598fb935c6

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the linked dotnetup documentation and locate the FullReplacement mode implementation and its Windows environment-variable handling. Reproduce the issue with an x86 app, then verify that setting DOTNET_ROOT(X86) to C:\Program Files (x86)\dotnet makes it load the x86 hostfxr.dll without breaking other modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.