From 17acf08ab445cfd8c7661d323d0852e401395700 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Tue, 24 Mar 2020 16:54:43 +0100 Subject: [PATCH 1/2] Pin dotnet to the recommended version from arcade --- global.json | 5 ++++- scripts/build.ps1 | 2 +- scripts/build.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index 1321affc3d..eff658fa7a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,9 @@ { + "sdk": { + "version": "3.1.101" + }, "tools": { - "dotnet": "3.1.100" + "dotnet": "3.1.101" }, "msbuild-sdks": { "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20052.1", diff --git a/scripts/build.ps1 b/scripts/build.ps1 index a17998919e..893b3f24a8 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -82,7 +82,7 @@ $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 # Dotnet build doesn't support --packages yet. See https://github.com/dotnet/cli/issues/2712 $env:NUGET_PACKAGES = $env:TP_PACKAGES_DIR $env:NUGET_EXE_Version = "3.4.3" -$env:DOTNET_CLI_VERSION = "3.1.100" +$env:DOTNET_CLI_VERSION = "3.1.101" # $env:DOTNET_RUNTIME_VERSION = "LATEST" $env:VSWHERE_VERSION = "2.0.2" $env:MSBUILD_VERSION = "15.0" diff --git a/scripts/build.sh b/scripts/build.sh index bbd447aab8..fe93fa812b 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -111,7 +111,7 @@ VERSION=$(test -z $VERSION && grep TPVersionPrefix $TP_ROOT_DIR/scripts/build/Te export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 # Dotnet build doesnt support --packages yet. See https://github.com/dotnet/cli/issues/2712 export NUGET_PACKAGES=$TP_PACKAGES_DIR -DOTNET_CLI_VERSION="3.1.100" +DOTNET_CLI_VERSION="3.1.101" #DOTNET_RUNTIME_VERSION="LATEST" # From 0b9c2027ff444880ec1a759c3a77788df100caa3 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Wed, 25 Mar 2020 12:50:15 +0100 Subject: [PATCH 2/2] Avoid error on SDK that we don't have and don't need --- global.json | 5 ++++- scripts/build.ps1 | 11 ++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/global.json b/global.json index eff658fa7a..d2637af033 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,9 @@ { "sdk": { - "version": "3.1.101" + "version": "3.1.101", + "rollForward": "minor", + "allowPrerelease": false, + "architecture": "x64" }, "tools": { "dotnet": "3.1.101" diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 893b3f24a8..999152316c 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -176,10 +176,10 @@ function Install-DotNetCli # Pull in additional shared frameworks. # Get netcoreapp2.1 shared components. - & $dotnetInstallScript -InstallDir "$dotnetInstallPath" -Runtime 'dotnet' -Version '2.1.0' -Channel 'release/2.1.0' -Architecture x64 -NoPath + & $dotnetInstallScript -InstallDir "$dotnetInstallPath" -Runtime 'dotnet' -Version '2.1.0' -Channel '2.1.0' -Architecture x64 -NoPath $env:DOTNET_ROOT= $dotnetInstallPath - & $dotnetInstallScript -InstallDir "${dotnetInstallPath}_x86" -Runtime 'dotnet' -Version '2.1.0' -Channel 'release/2.1.0' -Architecture x86 -NoPath + & $dotnetInstallScript -InstallDir "${dotnetInstallPath}_x86" -Runtime 'dotnet' -Version '2.1.0' -Channel '2.1.0' -Architecture x86 -NoPath ${env:DOTNET_ROOT(x86)} = "${dotnetInstallPath}_x86" $env:DOTNET_MULTILEVEL_LOOKUP=0 @@ -191,9 +191,10 @@ function Install-DotNetCli & "$env:DOTNET_ROOT\dotnet.exe" --info "`n`n---- x86 dotnet" - & "${env:DOTNET_ROOT(x86)}\dotnet.exe" --info - - + # avoid erroring out because we don't have the sdk for x86 that global.json requires + try { + & "${env:DOTNET_ROOT(x86)}\dotnet.exe" --info 2> $null + } catch {} Write-Log "Install-DotNetCli: Complete. {$(Get-ElapsedTime($timer))}" }