diff --git a/.devcontainer/android/devcontainer.json b/.devcontainer/android/devcontainer.json index 7820ff94c06a38..6f3b4c29f28309 100644 --- a/.devcontainer/android/devcontainer.json +++ b/.devcontainer/android/devcontainer.json @@ -55,8 +55,7 @@ // This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used. // Add the Android SDK tooling and emulator to the path. "remoteEnv": { - "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools/bin:${containerEnv:ANDROID_SDK_ROOT}/emulator:${containerEnv:ANDROID_SDK_ROOT}/platform-tools:${containerEnv:PATH}", - "DOTNET_MULTILEVEL_LOOKUP": "0" + "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:ANDROID_SDK_ROOT}/cmdline-tools/cmdline-tools/bin:${containerEnv:ANDROID_SDK_ROOT}/emulator:${containerEnv:ANDROID_SDK_ROOT}/platform-tools:${containerEnv:PATH}" }, // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ab8aa40f3b63bf..01e6d70e8191bc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -40,8 +40,7 @@ // Add the locally installed dotnet to the path to ensure that it is activated // This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used. "remoteEnv": { - "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}", - "DOTNET_MULTILEVEL_LOOKUP": "0" + "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}" }, // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. diff --git a/.devcontainer/libraries/devcontainer.json b/.devcontainer/libraries/devcontainer.json index d5fe8be4c14104..a5bdde60e6e2c4 100644 --- a/.devcontainer/libraries/devcontainer.json +++ b/.devcontainer/libraries/devcontainer.json @@ -46,8 +46,7 @@ // Add the locally installed dotnet to the path to ensure that it is activated // This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used. "remoteEnv": { - "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}", - "DOTNET_MULTILEVEL_LOOKUP": "0" + "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}" }, // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. diff --git a/.devcontainer/wasm-multiThreaded/devcontainer.json b/.devcontainer/wasm-multiThreaded/devcontainer.json index a0fefcc5e19e6c..66053051a97979 100644 --- a/.devcontainer/wasm-multiThreaded/devcontainer.json +++ b/.devcontainer/wasm-multiThreaded/devcontainer.json @@ -47,8 +47,7 @@ // This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used. // Add the global tools dir to the PATH so that globally installed tools will work "remoteEnv": { - "PATH": "${containerWorkspaceFolder}/.dotnet:${containerWorkspaceFolder}/.dotnet-tools-global:${containerEnv:PATH}", - "DOTNET_MULTILEVEL_LOOKUP": "0", + "PATH": "${containerWorkspaceFolder}/.dotnet:${containerWorkspaceFolder}/.dotnet-tools-global:${containerEnv:PATH}" }, // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. diff --git a/.devcontainer/wasm/devcontainer.json b/.devcontainer/wasm/devcontainer.json index a322fd1b858e97..dca8d430cb6158 100644 --- a/.devcontainer/wasm/devcontainer.json +++ b/.devcontainer/wasm/devcontainer.json @@ -47,8 +47,7 @@ // This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used. // Add the global tools dir to the PATH so that globally installed tools will work "remoteEnv": { - "PATH": "${containerWorkspaceFolder}/.dotnet:${containerWorkspaceFolder}/.dotnet-tools-global:${containerEnv:PATH}", - "DOTNET_MULTILEVEL_LOOKUP": "0", + "PATH": "${containerWorkspaceFolder}/.dotnet:${containerWorkspaceFolder}/.dotnet-tools-global:${containerEnv:PATH}" }, // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. diff --git a/dotnet.cmd b/dotnet.cmd index 39615ae63e1dcc..1079a9607a1597 100644 --- a/dotnet.cmd +++ b/dotnet.cmd @@ -13,9 +13,6 @@ set /p dotnetPath=<%~dp0artifacts\toolset\sdk.txt :: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69). set Platform= -:: Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism -set DOTNET_MULTILEVEL_LOOKUP=0 - :: Suppress the .NET startup banner set DOTNET_NOLOGO=1 diff --git a/dotnet.sh b/dotnet.sh index e4672b2e1c782a..d29282598f8ac4 100755 --- a/dotnet.sh +++ b/dotnet.sh @@ -12,9 +12,6 @@ while [[ -h $source ]]; do done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" -# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism -export DOTNET_MULTILEVEL_LOOKUP=0 - # Suppress the .NET startup banner export DOTNET_NOLOGO=1 diff --git a/eng/build.ps1 b/eng/build.ps1 index 0233b7cb94935a..eb90cf14e18a95 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -259,9 +259,6 @@ if ($vs) { # This tells MSBuild to load the SDK from the directory of the bootstrapped SDK $env:DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=$env:DOTNET_ROOT - # This tells .NET Core not to go looking for .NET Core in other places - $env:DOTNET_MULTILEVEL_LOOKUP=0; - # Put our local dotnet.exe on PATH first so Visual Studio knows which one to use $env:PATH=($env:DOTNET_ROOT + ";" + $env:PATH); diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 4bc50bd568cae1..444ff4be50ab55 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -157,9 +157,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { return $global:_DotNetInstallDir } - # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism - $env:DOTNET_MULTILEVEL_LOOKUP=0 - # Disable first run since we do not need all ASP.NET packages restored. $env:DOTNET_NOLOGO=1 @@ -225,7 +222,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) { # Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build Write-PipelinePrependPath -Path $dotnetRoot - Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0' Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1' return $global:_DotNetInstallDir = $dotnetRoot diff --git a/eng/common/tools.sh b/eng/common/tools.sh index c1841c9dfd0f4e..6c121300ac7da3 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -115,9 +115,6 @@ function InitializeDotNetCli { local install=$1 - # Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism - export DOTNET_MULTILEVEL_LOOKUP=0 - # Disable first run since we want to control all package sources export DOTNET_NOLOGO=1 @@ -166,7 +163,6 @@ function InitializeDotNetCli { # build steps from using anything other than what we've downloaded. Write-PipelinePrependPath -path "$dotnet_root" - Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0" Write-PipelineSetVariable -name "DOTNET_NOLOGO" -value "1" # return value diff --git a/eng/pipelines/common/macos-sign-with-entitlements.yml b/eng/pipelines/common/macos-sign-with-entitlements.yml index 6a20a31481eb9d..54b2d4c069d766 100644 --- a/eng/pipelines/common/macos-sign-with-entitlements.yml +++ b/eng/pipelines/common/macos-sign-with-entitlements.yml @@ -58,7 +58,6 @@ steps: MaxRetryAttempts: '5' PendingAnalysisWaitTimeoutMinutes: '5' env: - DOTNET_MULTILEVEL_LOOKUP: 0 DOTNET_ROOT: '$(Agent.TempDirectory)/dotnet' DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR: '$(Agent.TempDirectory)/dotnet' diff --git a/eng/testing/RunnerTemplate.cmd b/eng/testing/RunnerTemplate.cmd index f6ac731ec67c57..449942b9391245 100644 --- a/eng/testing/RunnerTemplate.cmd +++ b/eng/testing/RunnerTemplate.cmd @@ -41,9 +41,6 @@ set EXECUTION_DIR=%~dp0 :argparser_end -:: Don't use a globally installed SDK. -set DOTNET_MULTILEVEL_LOOKUP=0 - :: Assume failure set HAS_TEST_RESULTS=0 diff --git a/eng/testing/RunnerTemplate.sh b/eng/testing/RunnerTemplate.sh index 4c358d28bcc47d..52cba5880ba248 100644 --- a/eng/testing/RunnerTemplate.sh +++ b/eng/testing/RunnerTemplate.sh @@ -45,9 +45,6 @@ if [[ -z "$RUNTIME_PATH" ]]; then exit -1 fi -# Don't use a globally installed SDK. -export DOTNET_MULTILEVEL_LOOKUP=0 - exitcode_list[0]="Exited Successfully" exitcode_list[130]="SIGINT Ctrl-C occurred. Likely tests timed out." exitcode_list[131]="SIGQUIT Ctrl-\ occurred. Core dumped." diff --git a/src/coreclr/scripts/superpmi_aspnet.py b/src/coreclr/scripts/superpmi_aspnet.py index c61dd40068ca6b..63ca73e623cc84 100644 --- a/src/coreclr/scripts/superpmi_aspnet.py +++ b/src/coreclr/scripts/superpmi_aspnet.py @@ -137,7 +137,6 @@ def build_and_run(coreclr_args): # install dotnet 8.0 run_command([dotnet_install_script_path, "-Version", "8.0.0"], temp_location, _exit_on_fail=True) - os.environ['DOTNET_MULTILEVEL_LOOKUP'] = '0' os.environ['DOTNET_NOLOGO'] = '1' dotnet_path = path.join(source_directory, ".dotnet") dotnet_exe = path.join(dotnet_path, "dotnet.exe") if is_windows else path.join(dotnet_path, "dotnet") diff --git a/src/coreclr/scripts/superpmi_aspnet2.py b/src/coreclr/scripts/superpmi_aspnet2.py index 40ae796f7a6e66..76899a48a9d6e8 100644 --- a/src/coreclr/scripts/superpmi_aspnet2.py +++ b/src/coreclr/scripts/superpmi_aspnet2.py @@ -150,7 +150,6 @@ def setup_and_run_crank_agent(workdir: Path): dotnet_root_dir = dotnethome_dir os.environ['DOTNET_ROOT'] = str(dotnet_root_dir) os.environ['DOTNET_CLI_TELEMETRY_OPTOUT'] = '1' - os.environ['DOTNET_MULTILEVEL_LOOKUP'] = '0' os.environ['UseSharedCompilation'] = 'false' print("Installing tools ...") diff --git a/src/libraries/Common/tests/System/Net/StressTests/build-local.ps1 b/src/libraries/Common/tests/System/Net/StressTests/build-local.ps1 index 6aeba6c6b9d75e..f4def3f5f011f0 100644 --- a/src/libraries/Common/tests/System/Net/StressTests/build-local.ps1 +++ b/src/libraries/Common/tests/System/Net/StressTests/build-local.ps1 @@ -57,7 +57,6 @@ if (-not (Test-Path -Path $DailyDotnetRoot)) { $env:DOTNET_ROOT=$DailyDotnetRoot $env:PATH="$DailyDotnetRoot;$env:PATH" -$env:DOTNET_MULTILEVEL_LOOKUP=0 if (-not (Test-Path -Path "$TestHostRoot/shared/Microsoft.AspNetCore.App")) { Write-Host "Copying Microsoft.AspNetCore.App bits from daily SDK to testhost: $TestHostRoot" diff --git a/src/libraries/Common/tests/System/Net/StressTests/build-local.sh b/src/libraries/Common/tests/System/Net/StressTests/build-local.sh index cdaa86721b1db9..5412fd6c727b47 100755 --- a/src/libraries/Common/tests/System/Net/StressTests/build-local.sh +++ b/src/libraries/Common/tests/System/Net/StressTests/build-local.sh @@ -56,7 +56,6 @@ fi export DOTNET_ROOT=$daily_dotnet_root export PATH=$DOTNET_ROOT:$PATH -export DOTNET_MULTILEVEL_LOOKUP=0 if [[ ! -d "$testhost_root/shared/Microsoft.AspNetCore.App" ]]; then echo "Copying Microsoft.AspNetCore.App bits from daily SDK to testhost: $testhost_root" diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/load-corefx-testhost.ps1 b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/load-corefx-testhost.ps1 index 48168f4ee76b8c..27b1e72e032cc8 100755 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/load-corefx-testhost.ps1 +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/load-corefx-testhost.ps1 @@ -138,11 +138,10 @@ function Set-Sdk-Environment() } $pathSeparator=if($os -eq "windows") { ";" } else { ":" } - + $env:DOTNET_ROOT=$candidate_path $env:DOTNET_CLI_HOME=$candidate_path $env:PATH=($candidate_path + $pathSeparator + $env:PATH) - $env:DOTNET_MULTILEVEL_LOOKUP=0 $env:DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 } diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs index 7ada26e450c99d..433e1e4f0ce83c 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs @@ -123,7 +123,6 @@ public BuildEnvironment() // dotnet EnvVars["DOTNET_ROOT"] = sdkForWorkloadPath; EnvVars["DOTNET_INSTALL_DIR"] = sdkForWorkloadPath; - EnvVars["DOTNET_MULTILEVEL_LOOKUP"] = "0"; EnvVars["DOTNET_NOLOGO"] = "1"; EnvVars["PATH"] = $"{sdkForWorkloadPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}"; EnvVars["EM_WORKAROUND_PYTHON_BUG_34780"] = "1"; diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs b/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs index 30af0cac58b3ca..8dca4d5affc516 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/RunCommand.cs @@ -13,7 +13,6 @@ public RunCommand(BuildEnvironment buildEnv, ITestOutputHelper _testOutput, stri WithEnvironmentVariables(buildEnv.EnvVars); WithEnvironmentVariable("DOTNET_ROOT", Path.GetDirectoryName(buildEnv.DotNet)!); WithEnvironmentVariable("DOTNET_INSTALL_DIR", Path.GetDirectoryName(buildEnv.DotNet)!); - WithEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0"); WithEnvironmentVariable("DOTNET_NOLOGO", "1"); } } diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/ToolCommand.cs b/src/mono/wasm/Wasm.Build.Tests/Common/ToolCommand.cs index 9db8814f5136bc..2bb51b87b49370 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/ToolCommand.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/ToolCommand.cs @@ -164,7 +164,6 @@ private Process CreateProcess(string executable, string args) UseShellExecute = false }; - psi.Environment["DOTNET_MULTILEVEL_LOOKUP"] = "0"; psi.Environment["DOTNET_NOLOGO"] = "1"; // runtime repo sets this, which interferes with the tests