From b1721142d1c85f2aeda2d2ef5e038c627a89949e Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Sun, 19 Nov 2023 21:42:51 +0100 Subject: [PATCH] fix(bootstrapping): .NET SDK discovery --- build.ps1 | 2 +- build.sh | 2 +- source/Nuke.GlobalTool/templates/build.ps1 | 2 +- source/Nuke.GlobalTool/templates/build.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.ps1 b/build.ps1 index 723645491..4cb810cce 100644 --- a/build.ps1 +++ b/build.ps1 @@ -22,7 +22,6 @@ $DotNetChannel = "STS" $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 -$env:DOTNET_MULTILEVEL_LOOKUP = 0 $env:DOTNET_ROLL_FORWARD = "Major" $env:NUKE_TELEMETRY_OPTOUT = 1 @@ -72,6 +71,7 @@ else { ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } } $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" + $env:PATH = "$DotNetDirectory;$env:PATH" } Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)" diff --git a/build.sh b/build.sh index 053d6ecf6..d31d2417f 100755 --- a/build.sh +++ b/build.sh @@ -18,7 +18,6 @@ DOTNET_CHANNEL="STS" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -export DOTNET_MULTILEVEL_LOOKUP=0 export DOTNET_ROLL_FORWARD="Major" export NUKE_TELEMETRY_OPTOUT=1 @@ -65,6 +64,7 @@ else "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path fi export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" + export PATH="$DOTNET_DIRECTORY:$PATH" fi echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)" diff --git a/source/Nuke.GlobalTool/templates/build.ps1 b/source/Nuke.GlobalTool/templates/build.ps1 index 25f8f3e07..04ebfba81 100644 --- a/source/Nuke.GlobalTool/templates/build.ps1 +++ b/source/Nuke.GlobalTool/templates/build.ps1 @@ -22,7 +22,6 @@ $DotNetChannel = "STS" $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 -$env:DOTNET_MULTILEVEL_LOOKUP = 0 ########################################################################### # EXECUTION @@ -61,6 +60,7 @@ else { ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } } $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" + $env:PATH = "$DotNetDirectory;$env:PATH" } Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)" diff --git a/source/Nuke.GlobalTool/templates/build.sh b/source/Nuke.GlobalTool/templates/build.sh index 9f459d316..c7e565e91 100644 --- a/source/Nuke.GlobalTool/templates/build.sh +++ b/source/Nuke.GlobalTool/templates/build.sh @@ -18,7 +18,6 @@ DOTNET_CHANNEL="STS" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -export DOTNET_MULTILEVEL_LOOKUP=0 ########################################################################### # EXECUTION @@ -54,6 +53,7 @@ else "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path fi export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" + export PATH="$DOTNET_DIRECTORY:$PATH" fi echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"