From 9aa14b24f7e4a171a4c9aa74fb002cdd976e93d8 Mon Sep 17 00:00:00 2001 From: JT Date: Sat, 4 Jan 2025 21:10:53 +0800 Subject: [PATCH] Update global.json --- build.ps1 | 4 ++-- build.sh | 4 ++-- global.json | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 global.json diff --git a/build.ps1 b/build.ps1 index c0c0e61..4634dc0 100644 --- a/build.ps1 +++ b/build.ps1 @@ -20,9 +20,8 @@ $DotNetGlobalFile = "$PSScriptRoot\\global.json" $DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1" $DotNetChannel = "STS" -$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 -$env:DOTNET_MULTILEVEL_LOOKUP = 0 +$env:DOTNET_NOLOGO = 1 ########################################################################### # 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/build.sh b/build.sh index 2f10dcb..fdff0c6 100755 --- a/build.sh +++ b/build.sh @@ -17,8 +17,7 @@ DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh" DOTNET_CHANNEL="STS" export DOTNET_CLI_TELEMETRY_OPTOUT=1 -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -export DOTNET_MULTILEVEL_LOOKUP=0 +export DOTNET_NOLOGO=1 ########################################################################### # 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)" diff --git a/global.json b/global.json new file mode 100644 index 0000000..643aa3e --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "9.0.101", + "rollForward": "latestMajor" + } +}