From d68c96628b71c215e1df394c77a50eb94ef8c6ed Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 10 Feb 2018 23:47:47 +0000 Subject: [PATCH 1/2] Have a single point of reference for the .Net Core SDK version --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9b394a26b..c8a9b0e99 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,10 +28,12 @@ install: } - ps: | # the legacy WMF4 image only has the old preview SDKs of dotnet - if (-not ((dotnet --version).StartsWith('2.1.4'))) + $globalDotJson = Get-Content .\global.json | ConvertFrom-Json + $dotNetCoreSDKVersion = $globalDotJson.sdk.version + if (-not ((dotnet --version).StartsWith($dotNetCoreSDKVersion))) { Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1 - .\dotnet-install.ps1 -Version 2.1.4 + .\dotnet-install.ps1 -Version $dotNetCoreSDKVersion } build_script: From b25ffc81e59ad5631d8cc6719ae28397ce88c494 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 19 Feb 2018 21:07:48 +0000 Subject: [PATCH 2/2] update syntax for WMF4 due to a breaking change in the integration of Get-Content or ConvertFrom-Json --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e72bd5e6c..a0ce2df40 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,7 @@ install: } - ps: | # the legacy WMF4 image only has the old preview SDKs of dotnet - $globalDotJson = Get-Content .\global.json | ConvertFrom-Json + $globalDotJson = Get-Content .\global.json -Raw | ConvertFrom-Json $dotNetCoreSDKVersion = $globalDotJson.sdk.version if (-not ((dotnet --version).StartsWith($dotNetCoreSDKVersion))) {