From b7255a071d8c0a3d6d8d8c9cc8b34619b2f01efe Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Sat, 12 Jul 2025 09:36:18 -0500 Subject: [PATCH] remove old workaround from 2021 --- .../MSBuildForwardingAppWithoutLogging.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs index c3ef7b46fd69..94fd1c0e7a36 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs @@ -121,17 +121,6 @@ public void EnvironmentVariable(string name, string value) { _msbuildRequiredEnvironmentVariables.Add(name, value); } - - if (value == string.Empty || value == "\0") - { - // Unlike ProcessStartInfo.EnvironmentVariables, Environment.SetEnvironmentVariable can't set a variable - // to an empty value, so we just fall back to calling MSBuild out-of-proc if we encounter this case. - // https://github.com/dotnet/runtime/issues/50554 - InitializeForOutOfProcForwarding(); - - // Disable MSBUILDUSESERVER if any env vars are null as those are not properly transferred to build nodes - _msbuildRequiredEnvironmentVariables["MSBUILDUSESERVER"] = "0"; - } } public int Execute()