Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable building with a dotnet not on PATH (#69186)
* Enable building with a dotnet not on PATH In #68918 we removed inspecting DOTNET_HOST_PATH environment variable. This broke the scenario where a specific dotnet "hive" was installed to a location not on the PATH. When the .NET SDK commands invoke a sub-process (for example MSBuild), it sets the DOTNET_HOST_PATH environment variable to tell the sub-process "this is where the dotnet.exe that invoked this command is located". See #21237 and dotnet/cli#7311 for more info. This change reverts the behavior back to respect DOTNET_HOST_PATH, and if it isn't set it will just use "dotnet" and let the OS take care of finding the executable on the PATH. Fix #69150 * Fix tests to workaround MSBuild searching the PATH itself. * Respond to PR feedback. Make the change smaller until @jaredpar gets back. Only make the minimal change required, which is to check DOTNET_HOST_PATH.
- Loading branch information