Skip to content

Commit 06ccad4

Browse files
Automatically install both the 'current' and 'preview' SDKs when building in Appveyor
1 parent 4fd19b4 commit 06ccad4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

appveyor.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
init:
22
- git config --global core.autocrlf true
3+
install:
4+
# .NET Core SDK binaries
5+
# Download .NET Core SDK and add to PATH
6+
- ps: $urlCurrent = "https://go.microsoft.com/fwlink/?LinkID=834991"
7+
- ps: $urlPreview = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-win-x64.latest.zip"
8+
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
9+
- ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
10+
- ps: $tempFileCurrent = [System.IO.Path]::GetTempFileName()
11+
- ps: $tempFilePreview = [System.IO.Path]::GetTempFileName()
12+
- ps: (New-Object System.Net.WebClient).DownloadFile($urlCurrent, $tempFileCurrent)
13+
- ps: (New-Object System.Net.WebClient).DownloadFile($urlPreview, $tempFilePreview)
14+
- ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFileCurrent, $env:DOTNET_INSTALL_DIR)
15+
- ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFilePreview, $env:DOTNET_INSTALL_DIR + "preview")
16+
- ps: Move-Item "${env:DOTNET_INSTALL_DIR}preview\sdk\*" "${env:DOTNET_INSTALL_DIR}\sdk\"
17+
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
318
build_script:
419
- npm install -g npm@^3.0.0
520
- npm --prefix templates/package-builder install

0 commit comments

Comments
 (0)