Set DOTNET_ROOT in tests (#5584)
This commit is contained in:
parent
4abb5e7a4f
commit
5e444258cb
1 changed files with 11 additions and 0 deletions
|
@ -145,6 +145,17 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
psi.Environment["DOTNET_MULTILEVEL_LOOKUP"] = "0";
|
psi.Environment["DOTNET_MULTILEVEL_LOOKUP"] = "0";
|
||||||
psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1";
|
psi.Environment["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "1";
|
||||||
|
|
||||||
|
// Set DOTNET_ROOT to ensure sub process find the same host fxr
|
||||||
|
string dotnetDirectoryPath = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest);
|
||||||
|
if (System.Environment.Is64BitProcess)
|
||||||
|
{
|
||||||
|
psi.Environment.Add("DOTNET_ROOT", dotnetDirectoryPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
psi.Environment.Add("DOTNET_ROOT(x86)", dotnetDirectoryPath);
|
||||||
|
}
|
||||||
|
|
||||||
AddEnvironmentVariablesTo(psi);
|
AddEnvironmentVariablesTo(psi);
|
||||||
|
|
||||||
AddWorkingDirectoryTo(psi);
|
AddWorkingDirectoryTo(psi);
|
||||||
|
|
Loading…
Reference in a new issue