dotnet / dotnet/sdk

SdkResolver may need to set DOTNET_ROOT(_<ARCH>) in order for framework-dependent processes inside an IDE to run correctly

Open
#49,825 1 comment 1 reaction 1 assignee Claimed by @baronfel View on GitHub
Area-NetSDK Area-SdkResolvers Area-VS untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is your feature request related to a problem? Please describe.

@MiYanni found this while testing the .NET TaskHost on a preview build of VS. While this version of VS can use the global.json `sdk.paths` feature to locate SDK roots correctly, and while this version of VS does set the DOTNET_EXPERIMENTAL_HOST_PATH property (soon to be env var) to enable the use of the .NET TaskHost, there are still standalone .NET executables that are produced during the normal flow of development, like `testhost.exe`. In the SDK repo, tests in VS weren't running because the testhost.exe produced during the build of test projects couldn't resolve a preview7 runtime.

Setting DOTNET_ROOT to `/.dotnet` before launching VS enabled those testhost.exe binaries to launch.
The SkdResolver may need to set this property/environment variable as well in order for VS environments to maintain parity with CLI experiences.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.