|
1 | 1 | os: Visual Studio 2015
|
2 | 2 |
|
3 |
| -## .NET Core SDK preview1 is already installed in the build worker image Visual Studio 2015 |
4 |
| -## |
5 |
| -## To install a specific version: |
6 |
| -## |
7 |
| -## install: |
8 |
| -## # .NET Core SDK binaries |
9 |
| -## ## 1) from direct url |
10 |
| -## - ps: $url = "https://go.microsoft.com/fwlink/?LinkID=798402" # v1.0.0-preview1 x64 |
11 |
| -## ## 2) from url based on version, for example using an env var CLI_VERSION that can be a |
12 |
| -## ## a specific version `1.0.0-preview2-003121` or `Latest` (for latest dev version) |
13 |
| -## - ps: $url = "https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$($env:CLI_VERSION)/dotnet-dev-win-x64.$($env:CLI_VERSION.ToLower()).zip" |
14 |
| -## # Download .NET Core SDK and add to PATH |
15 |
| -## - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk" |
16 |
| -## - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null |
17 |
| -## - ps: $tempFile = [System.IO.Path]::GetTempFileName() |
18 |
| -## - ps: (New-Object System.Net.WebClient).DownloadFile($url, $tempFile) |
19 |
| -## - ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFile, $env:DOTNET_INSTALL_DIR) |
20 |
| -## - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" |
| 3 | +# NOTE .NET Core SDK preview2 is already installed in the build worker image Visual Studio 2015 |
| 4 | +# so the `install` section is not required |
| 5 | + |
| 6 | +environment: |
| 7 | + CLI_VERSION: 1.0.0-rc4-004771 |
| 8 | + |
| 9 | +install: |
| 10 | + - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk" |
| 11 | + - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null |
| 12 | + - ps: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" |
| 13 | + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version $env:CLI_VERSION -InstallDir $env:DOTNET_INSTALL_DIR' |
| 14 | + - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" |
21 | 15 |
|
22 | 16 | build_script:
|
23 | 17 | # dotnet info
|
24 | 18 | - ps: dotnet --info
|
25 | 19 | # Run dotnet new
|
26 | 20 | - ps: mkdir "test\test-dotnet-new" -Force | Push-Location
|
27 |
| - - ps: dotnet new --lang fsharp |
| 21 | + - ps: dotnet new console -lang f# |
28 | 22 | - ps: dotnet restore
|
29 |
| - - ps: dotnet --verbose build |
30 |
| - - ps: dotnet --verbose run a b |
| 23 | + - ps: dotnet build |
| 24 | + - ps: dotnet run a b |
31 | 25 | - ps: Pop-Location
|
32 | 26 |
|
33 | 27 |
|
|
0 commit comments