Skip to content

Commit ba4f44e

Browse files
committed
Install SDK in Setup.ps1
1 parent be6b75c commit ba4f44e

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

Setup.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
$RequiredDotnetVersion = $(cat ./global.json | convertfrom-json).sdk.version
4+
5+
mkdir "./build"
6+
7+
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./build/installcli.ps1"
8+
& ./build/installcli.ps1 -InstallDir "$pwd/.dotnetcli" -NoPath -Version $RequiredDotnetVersion
9+
if ($LASTEXITCODE) { exit 1 }
10+
11+
$env:Path = "$pwd/.dotnetcli;$env:Path"

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '{build}'
22
skip_tags: true
33
image: Visual Studio 2017
44
install:
5-
- ps: mkdir -Force ".\build\" | Out-Null
5+
- ps: ./Setup.ps1
66
build_script:
77
- ps: ./Build.ps1
88
test: off

serilog-aspnetcore.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26730.12
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29209.62
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A1893BD1-333D-4DFE-A0F0-DDBB2FE526E0}"
77
EndProject
@@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{9C21B9
1616
global.json = global.json
1717
README.md = README.md
1818
assets\Serilog.snk = assets\Serilog.snk
19+
Setup.ps1 = Setup.ps1
1920
EndProjectSection
2021
EndProject
2122
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.AspNetCore", "src\Serilog.AspNetCore\Serilog.AspNetCore.csproj", "{0549D23F-986B-4FB2-BACE-16FD7A7BC9EF}"

0 commit comments

Comments
 (0)