-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Currently, we add a property DOTNET_EXPERIMENTAL_HOST_PATH
to SdkResult
in MSBuildSdkResolver
https://github.com/dotnet/sdk/blob/main/src/Resolvers/Microsoft.DotNet.MSBuildSdkResolver/MSBuildSdkResolver.cs#L35
Instead it should be set from resolverResult.ResolvedSdkPath
which I tried to do in this PR https://github.com/dotnet/sdk/pull/49391/files and should be available as DOTNET_HOST_PATH
env var. We need it for compiler to be able to access DOTNET_HOST_PATH
env var in Csc task https://github.com/dotnet/roslyn/blob/0256a957942e9605fc62eb917d0034db20cc1d1d/src/Compilers/Shared/RuntimeHostInfo.cs#L47
The new behavior should be
- Properties
SdkResolverMSBuildTaskHostRuntimeVersion
and formerDOTNET_EXPERIMENTAL_HOST_PATH
should be set not from thePATH
but fromresolverResult.ResolvedSdkDirectory
. The new name forDOTNET_EXPERIMENTAL_HOST_PATH
property should be smth likeSdkResolverDotnetHostPathToSet
. see more in this bug DOTNET_EXPERIMENTAL_HOST_PATH set incorrectly with SDK hint paths sdk#49363. - The env var
DOTNET_HOST_PATH
(without _EXPERIMENTAL) should be set from that property on MSBuild side not inside the resolver. The reason for that is because we evaluate projects in parallel in many cases (graph build, VS solution load) and so the resolver shouldn't be setting global process state.
Metadata
Metadata
Assignees
Labels
No labels