Disable multilevel lookup during build (dotnet/core-setup#4367)
authorSteve Harter <steveharter@users.noreply.github.com>
Fri, 13 Jul 2018 21:21:23 +0000 (16:21 -0500)
committerGitHub <noreply@github.com>
Fri, 13 Jul 2018 21:21:23 +0000 (16:21 -0500)
Commit migrated from https://github.com/dotnet/core-setup/commit/4b9c63e028ccc4560c3704bf42d4e86ec7e278b3

src/installer/run.ps1
src/installer/run.sh
src/installer/test/HostActivationTests/GivenThatICareAboutDotnetArgValidationScenarios.cs

index 1a26083..fd09cd0 100644 (file)
@@ -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
 
index f4bf53b..9dae313 100755 (executable)
@@ -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
 
index db521fd..743b754 100644 (file)
@@ -94,7 +94,7 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation.ArgValidation
             dotnet.Exec("--fx-version")
                 .CaptureStdOut()
                 .CaptureStdErr()
-                .Execute()
+                .Execute(fExpectedToFail: true)
                 .Should()
                 .Fail()
                 .And