diff --git a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index b9da56f11..01e4b5922 100644 --- a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -135,7 +135,8 @@ namespace Microsoft.DotNet.Cli.Publish.Tests var outputProgram = Path.Combine(outputDirectory.FullName, $"{testAppName}{Constants.ExeSuffix}"); var command = new TestCommand(outputProgram); - command.Environment["DOTNET_ROOT"]= new RepoDirectoriesProvider().DotnetRoot; + command.Environment[Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"] = + new RepoDirectoriesProvider().DotnetRoot; command.ExecuteWithCapturedOutput() .Should()