Skip to content

Commit ebc413a

Browse files
bergmeisterJamesWTruher
authored andcommitted
Have a single point of reference for the .Net Core SDK version (#885)
* Have a single point of reference for the .Net Core SDK version * update syntax for WMF4 due to a breaking change in the integration of Get-Content or ConvertFrom-Json
1 parent 5d818d1 commit ebc413a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

appveyor.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ install:
2828
}
2929
- ps: |
3030
# the legacy WMF4 image only has the old preview SDKs of dotnet
31-
if (-not ((dotnet --version).StartsWith('2.1.4')))
31+
$globalDotJson = Get-Content .\global.json -Raw | ConvertFrom-Json
32+
$dotNetCoreSDKVersion = $globalDotJson.sdk.version
33+
if (-not ((dotnet --version).StartsWith($dotNetCoreSDKVersion)))
3234
{
3335
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1
34-
.\dotnet-install.ps1 -Version 2.1.4
36+
.\dotnet-install.ps1 -Version $dotNetCoreSDKVersion
3537
}
3638
3739
build_script:

0 commit comments

Comments
 (0)