diff --git a/Build.ps1 b/Build.ps1
index 41fbf5d..d7a7f17 100644
--- a/Build.ps1
+++ b/Build.ps1
@@ -1,24 +1,24 @@
-echo "build: Build started"
+Write-Output "build: Build started"
Push-Location $PSScriptRoot
if(Test-Path .\artifacts) {
- echo "build: Cleaning .\artifacts"
+ Write-Output "build: Cleaning .\artifacts"
Remove-Item .\artifacts -Force -Recurse
}
& dotnet restore --no-cache
-$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
-$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
+$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$null -ne $env:APPVEYOR_REPO_BRANCH];
+$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$null -ne $env:APPVEYOR_BUILD_NUMBER];
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
-echo "build: Version suffix is $suffix"
+Write-Output "build: Version suffix is $suffix"
-foreach ($src in ls src/*) {
+foreach ($src in Get-ChildItem "src/*") {
Push-Location $src
- echo "build: Packaging project in $src"
+ Write-Output "build: Packaging project in $src"
if($suffix) {
& dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix
@@ -31,10 +31,10 @@ foreach ($src in ls src/*) {
Pop-Location
}
-foreach ($test in ls test/*.PerformanceTests) {
+foreach ($test in Get-ChildItem "test/*.PerformanceTests") {
Push-Location $test
- echo "build: Building performance test project in $test"
+ Write-Output "build: Building performance test project in $test"
& dotnet build -c Release
if($LASTEXITCODE -ne 0) { exit 2 }
@@ -42,10 +42,10 @@ foreach ($test in ls test/*.PerformanceTests) {
Pop-Location
}
-foreach ($test in ls test/*.Tests) {
+foreach ($test in Get-ChildItem "test/*.Tests") {
Push-Location $test
- echo "build: Testing project in $test"
+ Write-Output "build: Testing project in $test"
& dotnet test -c Release
if($LASTEXITCODE -ne 0) { exit 3 }
diff --git a/Setup.ps1 b/Setup.ps1
new file mode 100644
index 0000000..a0fc768
--- /dev/null
+++ b/Setup.ps1
@@ -0,0 +1,11 @@
+$ErrorActionPreference = "Stop"
+
+$RequiredDotnetVersion = $(Get-Content ./global.json | convertfrom-json).sdk.version
+
+mkdir "./build"
+
+Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./build/installcli.ps1"
+& ./build/installcli.ps1 -InstallDir "$pwd/.dotnetcli" -NoPath -Version $RequiredDotnetVersion
+if ($LASTEXITCODE) { exit 1 }
+
+$env:Path = "$pwd/.dotnetcli;$env:Path"
diff --git a/appveyor.yml b/appveyor.yml
index 9ca24f7..9c8b460 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,8 +1,10 @@
version: '{build}'
skip_tags: true
-image: Visual Studio 2017
+image: Visual Studio 2019
configuration: Release
test: off
+install:
+- ps: ./Setup.ps1
build_script:
- ps: ./Build.ps1
artifacts:
diff --git a/global.json b/global.json
index 0a37afd..f1c2b2b 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "2.2.105"
+ "version": "3.1.101"
}
-}
+}
\ No newline at end of file
diff --git a/samples/SimpleServiceSample/SimpleServiceSample.csproj b/samples/SimpleServiceSample/SimpleServiceSample.csproj
index 36bbcf2..0e5e56a 100644
--- a/samples/SimpleServiceSample/SimpleServiceSample.csproj
+++ b/samples/SimpleServiceSample/SimpleServiceSample.csproj
@@ -1,8 +1,9 @@
- netcoreapp2.1
+ netcoreapp3.1
Exe
+
@@ -12,13 +13,20 @@
+
+ [*, 9999.0)
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
diff --git a/src/Serilog.Extensions.Hosting/Serilog.Extensions.Hosting.csproj b/src/Serilog.Extensions.Hosting/Serilog.Extensions.Hosting.csproj
index d8a31b7..073ee88 100644
--- a/src/Serilog.Extensions.Hosting/Serilog.Extensions.Hosting.csproj
+++ b/src/Serilog.Extensions.Hosting/Serilog.Extensions.Hosting.csproj
@@ -4,7 +4,7 @@
Serilog support for .NET Core logging in hosted services
3.0.1
Microsoft;Serilog Contributors
- netstandard2.0
+ netstandard2.0;
true
true
Serilog.Extensions.Hosting
@@ -13,9 +13,10 @@
true
Serilog.Extensions.Hosting
serilog;aspnet;aspnetcore;hosting
+ serilog-extension-nuget.png
http://serilog.net/images/serilog-extension-nuget.png
https://github.com/serilog/serilog-extensions-hosting
- http://www.apache.org/licenses/LICENSE-2.0
+ Apache-2.0
https://github.com/serilog/serilog-extensions-hosting
git
false
@@ -23,11 +24,22 @@
-
-
-
-
-
+
+
+
+
+ [*, 9999.0)
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Serilog.Extensions.Hosting/images/serilog-extension-nuget.png b/src/Serilog.Extensions.Hosting/images/serilog-extension-nuget.png
new file mode 100644
index 0000000..1dfe430
Binary files /dev/null and b/src/Serilog.Extensions.Hosting/images/serilog-extension-nuget.png differ
diff --git a/test/Serilog.Extensions.Hosting.Tests/Serilog.Extensions.Hosting.Tests.csproj b/test/Serilog.Extensions.Hosting.Tests/Serilog.Extensions.Hosting.Tests.csproj
index bb9c750..3051273 100644
--- a/test/Serilog.Extensions.Hosting.Tests/Serilog.Extensions.Hosting.Tests.csproj
+++ b/test/Serilog.Extensions.Hosting.Tests/Serilog.Extensions.Hosting.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.1
Serilog.Extensions.Hosting.Tests
../../assets/Serilog.snk
true
@@ -14,11 +14,8 @@
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+