From 8205dd4a150e5f714f45b92dc18f7510185751af Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Mon, 11 Jun 2018 21:55:47 -0700 Subject: [PATCH] Fix publish test for 32-bit environments. Ensure the correct DOTNET_ROOT variable is set for the apphost being run. --- .../GivenDotnetPublishPublishesProjects.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()