From 77d9ccd14c25f5fc1d6b79fe7b4dc2aa442ada12 Mon Sep 17 00:00:00 2001 From: Steve Harter Date: Fri, 13 Jul 2018 16:21:23 -0500 Subject: [PATCH] Disable multilevel lookup during build (dotnet/core-setup#4367) Commit migrated from https://github.com/dotnet/core-setup/commit/4b9c63e028ccc4560c3704bf42d4e86ec7e278b3 --- src/installer/run.ps1 | 3 +++ src/installer/run.sh | 3 +++ .../GivenThatICareAboutDotnetArgValidationScenarios.cs | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/installer/run.ps1 b/src/installer/run.ps1 index 1a26083..fd09cd0 100644 --- a/src/installer/run.ps1 +++ b/src/installer/run.ps1 @@ -5,6 +5,9 @@ $restorePackagesPath = Join-Path $PSScriptRoot "packages" # We do not want to run the first-time experience. $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 +# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism +$env:DOTNET_MULTILEVEL_LOOKUP=0 + $initTools = Join-Path $PSScriptRoot "init-tools.cmd" & $initTools diff --git a/src/installer/run.sh b/src/installer/run.sh index f4bf53b..9dae313 100755 --- a/src/installer/run.sh +++ b/src/installer/run.sh @@ -5,6 +5,9 @@ __scriptpath=$(cd "$(dirname "$0")"; pwd -P) # We do not want to run the first-time experience. export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 +# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism +export DOTNET_MULTILEVEL_LOOKUP=0 + # Source the init-tools.sh script rather than execute in order to preserve ulimit values in child-processes. https://github.com/dotnet/corefx/issues/19152 . $__scriptpath/init-tools.sh diff --git a/src/installer/test/HostActivationTests/GivenThatICareAboutDotnetArgValidationScenarios.cs b/src/installer/test/HostActivationTests/GivenThatICareAboutDotnetArgValidationScenarios.cs index db521fd..743b754 100644 --- a/src/installer/test/HostActivationTests/GivenThatICareAboutDotnetArgValidationScenarios.cs +++ b/src/installer/test/HostActivationTests/GivenThatICareAboutDotnetArgValidationScenarios.cs @@ -94,7 +94,7 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.ArgValidation dotnet.Exec("--fx-version") .CaptureStdOut() .CaptureStdErr() - .Execute() + .Execute(fExpectedToFail: true) .Should() .Fail() .And -- 2.7.4