diff --git a/.gitignore b/.gitignore index db9e81a..c90bd95 100644 --- a/.gitignore +++ b/.gitignore @@ -201,4 +201,3 @@ FakesAssemblies/ project.lock.json artifacts/ -/test/TestApp-* diff --git a/Build.ps1 b/Build.ps1 index 18d5bfb..1513382 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -30,6 +30,9 @@ if($LASTEXITCODE -ne 0) { throw 'pack failed' } Write-Output "build: Testing" -& dotnet test test\Serilog.Settings.Configuration.Tests\Serilog.Settings.Configuration.Tests.csproj +# Dotnet test doesn't run separate TargetFrameworks in parallel: https://github.com/dotnet/sdk/issues/19147 +# Workaround: use `dotnet test` on dlls directly in order to pass the `--parallel` option to vstest. +# The _reported_ runtime is wrong but the _actual_ used runtime is correct, see https://github.com/microsoft/vstest/issues/2037#issuecomment-720549173 +& dotnet test test\Serilog.Settings.Configuration.Tests\bin\Release\*\Serilog.Settings.Configuration.Tests.dll --parallel -if($LASTEXITCODE -ne 0) { throw 'unit tests failed' } +if($LASTEXITCODE -ne 0) { throw 'unit tests failed' } \ No newline at end of file diff --git a/global.json b/global.json index 5ce8495..b7e3357 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,7 @@ { "sdk": { - "version": "8.0.100" + "version": "8.0.100", + "allowPrerelease": false, + "rollForward": "latestFeature" } } diff --git a/test/Serilog.Settings.Configuration.Tests/Serilog.Settings.Configuration.Tests.csproj b/test/Serilog.Settings.Configuration.Tests/Serilog.Settings.Configuration.Tests.csproj index b04410e..e79a4d5 100644 --- a/test/Serilog.Settings.Configuration.Tests/Serilog.Settings.Configuration.Tests.csproj +++ b/test/Serilog.Settings.Configuration.Tests/Serilog.Settings.Configuration.Tests.csproj @@ -3,6 +3,7 @@ net48 $(TargetFrameworks);net6.0;net7.0;net8.0 + false