From 3ccd988276ba45b0efdd4cd9272cbed78fca5cbb Mon Sep 17 00:00:00 2001 From: Virgile Bello Date: Wed, 3 Nov 2021 23:17:00 +0900 Subject: [PATCH] Since MSBuild.exe filename was not taken into account with GetFolderAbove count, dotnet executable was looked up in sdk subfolder --- .../Components/Communications/NodeProviderOutOfProcBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs b/src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs index ef21df23454..864b6f8ce81 100644 --- a/src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs +++ b/src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs @@ -590,7 +590,7 @@ private static string GetCurrentHost() #if RUNTIME_TYPE_NETCORE || MONO if (CurrentHost == null) { - string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, 2), + string dotnetExe = Path.Combine(FileUtilities.GetFolderAbove(BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory, 2), NativeMethodsShared.IsWindows ? "dotnet.exe" : "dotnet"); if (File.Exists(dotnetExe)) {