From b4a62a0b8f8429692278227b2dc8e8563ceac757 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Mon, 29 Aug 2022 19:10:08 -0700 Subject: [PATCH] Workaround 7.0 msbuild bug hit in MacOS CI builds --- .../DotNetBuildDebuggeeTestStep.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs b/src/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs index 63ef96bbbe..b2a3cb234d 100644 --- a/src/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs +++ b/src/Microsoft.Diagnostics.TestHelpers/DotNetBuildDebuggeeTestStep.cs @@ -192,6 +192,7 @@ protected async Task Restore(string extraArgs, ITestOutputHelper output) ProcessRunner runner = new ProcessRunner(DotNetToolPath, args). WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0"). WithEnvironmentVariable("DOTNET_ROOT", Path.GetDirectoryName(DotNetToolPath)). + WithEnvironmentVariable("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "true"). WithEnvironmentVariable("DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR", Path.GetDirectoryName(DotNetToolPath)). WithEnvironmentVariable("DOTNET_INSTALL_DIR", Path.GetDirectoryName(DotNetToolPath)). RemoveEnvironmentVariable("MSBuildSDKsPath"). @@ -238,6 +239,7 @@ protected async Task Build(string dotnetArgs, ITestOutputHelper output) ProcessRunner runner = new ProcessRunner(DotNetToolPath, dotnetArgs). WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0"). WithEnvironmentVariable("DOTNET_ROOT", Path.GetDirectoryName(DotNetToolPath)). + WithEnvironmentVariable("DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER", "true"). WithEnvironmentVariable("DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR", Path.GetDirectoryName(DotNetToolPath)). WithEnvironmentVariable("DOTNET_INSTALL_DIR", Path.GetDirectoryName(DotNetToolPath)). RemoveEnvironmentVariable("MSBuildSDKsPath").