From d7f7c78d7009c35d0ee3e43e4c9fd081245bade2 Mon Sep 17 00:00:00 2001 From: filzrev <103790468+filzrev@users.noreply.github.com> Date: Wed, 28 Jan 2026 05:47:57 +0900 Subject: [PATCH 1/3] chore: add retry for curl that download dotnet-install.sh --- build/build.ps1 | 7 ++++++- build/build.sh | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build/build.ps1 b/build/build.ps1 index 4277479dcb..0ccddbd329 100755 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -20,6 +20,9 @@ if ($PSVersionTable.PSEdition -ne 'Core') { } } +# Temporary remove curl alias. +Remove-Item alias:curl + ########################################################################### # INSTALL .NET CORE CLI ########################################################################### @@ -55,7 +58,9 @@ $GlobalJsonPath = Join-Path $SdkPath "global.json" if (!(Test-Path $InstallPath)) { New-Item -Path $InstallPath -ItemType Directory -Force | Out-Null; $ScriptPath = Join-Path $InstallPath 'dotnet-install.ps1' - (New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, $ScriptPath); + + curl -LsSfo $ScriptPath $DotNetInstallerUri --retry 5 --retry-delay 5 + & $ScriptPath -JSonFile $GlobalJsonPath -InstallDir $InstallPath; # Install .NET 8 SDK diff --git a/build/build.sh b/build/build.sh index 0a59db926c..8966f08139 100755 --- a/build/build.sh +++ b/build/build.sh @@ -13,7 +13,7 @@ export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 if [ ! -d "$PROJECT_ROOT/.dotnet" ]; then mkdir "$PROJECT_ROOT/.dotnet" - curl -Lsfo "$PROJECT_ROOT/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh + curl -LsSfo "$PROJECT_ROOT/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh --retry 5 --retry-delay 5 bash "$PROJECT_ROOT/.dotnet/dotnet-install.sh" --jsonfile ./build/sdk/global.json --install-dir .dotnet --no-path # Install .NET 8 SDK From f87af3f82dadfdf97ad9305c67de379b0bc886a8 Mon Sep 17 00:00:00 2001 From: filzrev <103790468+filzrev@users.noreply.github.com> Date: Wed, 28 Jan 2026 15:56:11 +0900 Subject: [PATCH 2/3] chore: modify build scripts to use powershell core --- build/build.bat | 2 +- build/build.ps1 | 5 ++--- docs/articles/contributing/building.md | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build/build.bat b/build/build.bat index 7d4894cb4a..26cd3f5a36 100644 --- a/build/build.bat +++ b/build/build.bat @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" \ No newline at end of file +pwsh -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" \ No newline at end of file diff --git a/build/build.ps1 b/build/build.ps1 index 0ccddbd329..2c808efd5d 100755 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -1,5 +1,7 @@ #!/usr/bin/env pwsh +#Requires -PSEdition Core + $DotNetInstallerUri = 'https://dot.net/v1/dotnet-install.ps1'; $BuildPath = Split-Path $MyInvocation.MyCommand.Path -Parent $PSScriptRoot = Split-Path $PSScriptRoot -Parent @@ -20,9 +22,6 @@ if ($PSVersionTable.PSEdition -ne 'Core') { } } -# Temporary remove curl alias. -Remove-Item alias:curl - ########################################################################### # INSTALL .NET CORE CLI ########################################################################### diff --git a/docs/articles/contributing/building.md b/docs/articles/contributing/building.md index 6288a84b07..8ee3b923b7 100644 --- a/docs/articles/contributing/building.md +++ b/docs/articles/contributing/building.md @@ -17,7 +17,7 @@ Once all the necessary tools are in place, building is trivial. Simply open solu The build currently depends on the following prerequisites: - Windows: - - PowerShell version 5 or higher + - PowerShell Core - MSBuild version 15.1 or higher - .NET Framework 4.6 or higher From a731881a779b55330890fabff6fee374ae639890 Mon Sep 17 00:00:00 2001 From: filzrev <103790468+filzrev@users.noreply.github.com> Date: Fri, 30 Jan 2026 20:13:02 +0900 Subject: [PATCH 3/3] chore: remove dead code --- build/build.ps1 | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/build/build.ps1 b/build/build.ps1 index 2c808efd5d..c8eb331a20 100755 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -6,22 +6,6 @@ $DotNetInstallerUri = 'https://dot.net/v1/dotnet-install.ps1'; $BuildPath = Split-Path $MyInvocation.MyCommand.Path -Parent $PSScriptRoot = Split-Path $PSScriptRoot -Parent -if ($PSVersionTable.PSEdition -ne 'Core') { - # Attempt to set highest encryption available for SecurityProtocol. - # PowerShell will not set this by default (until maybe .NET 4.6.x). This - # will typically produce a message for PowerShell v2 (just an info - # message though) - try { - # Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48) - # Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't - # exist in .NET 4.0, even though they are addressable if .NET 4.5+ is - # installed (.NET 4.5 is an in-place upgrade). - [System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48 - } catch { - Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3' - } -} - ########################################################################### # INSTALL .NET CORE CLI ###########################################################################