Skip to content

Commit fe4afd2

Browse files
authored
Merge pull request #228 from nblumhardt/net-80-rc2
Update to .NET 8 RC2
2 parents 24d8583 + 80064f8 commit fe4afd2

File tree

9 files changed

+42
-22
lines changed

9 files changed

+42
-22
lines changed

Build.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
echo "build: Build started"
22

3+
$env:Path = "$pwd/.dotnetcli;$env:Path"
4+
35
Push-Location $PSScriptRoot
46

57
if(Test-Path .\artifacts) {
@@ -26,7 +28,7 @@ foreach ($src in ls src/*) {
2628
& dotnet pack -c Release --include-source -o ..\..\artifacts
2729
}
2830

29-
if($LASTEXITCODE -ne 0) { exit 1 }
31+
if($LASTEXITCODE -ne 0) { throw "build failed" }
3032

3133
Pop-Location
3234
}
@@ -37,7 +39,7 @@ foreach ($test in ls test/*.PerformanceTests) {
3739
echo "build: Building performance test project in $test"
3840

3941
& dotnet build -c Release
40-
if($LASTEXITCODE -ne 0) { exit 2 }
42+
if($LASTEXITCODE -ne 0) { throw "test failed" }
4143

4244
Pop-Location
4345
}
@@ -48,7 +50,7 @@ foreach ($test in ls test/*.Tests) {
4850
echo "build: Testing project in $test"
4951

5052
& dotnet test -c Release
51-
if($LASTEXITCODE -ne 0) { exit 3 }
53+
if($LASTEXITCODE -ne 0) { throw "test failed" }
5254

5355
Pop-Location
5456
}

Setup.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
$RequiredDotnetVersion = $(cat ./global.json | convertfrom-json).sdk.version
4+
5+
New-Item -ItemType Directory -Force "./build/" | Out-Null
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) { throw ".NET install failed" }

appveyor.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ version: '{build}'
22
skip_tags: true
33
image: Visual Studio 2022
44
install:
5-
- ps: mkdir -Force ".\build\" | Out-Null
5+
- pwsh: ./Setup.ps1
6+
- pwsh: mkdir -Force ".\build\" | Out-Null
67
build_script:
7-
- ps: ./Build.ps1
8+
- pwsh: ./Build.ps1
89
test: off
910
artifacts:
1011
- path: artifacts/Serilog.*.nupkg

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100-rc.2.23502.2"
4+
}
5+
}

samples/Sample/Sample.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<AssemblyName>Sample</AssemblyName>
66
<OutputType>Exe</OutputType>
77
<ImplicitUsings>enable</ImplicitUsings>
@@ -12,8 +12,8 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
16-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
15+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0-*" />
16+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0-*" />
1717
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
1818
</ItemGroup>
1919

serilog-extensions-logging.sln

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{9C21B9
2424
Directory.Build.targets = Directory.Build.targets
2525
README.md = README.md
2626
assets\Serilog.snk = assets\Serilog.snk
27+
build.sh = build.sh
28+
Setup.ps1 = Setup.ps1
29+
global.json = global.json
2730
EndProjectSection
2831
EndProject
2932
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Extensions.Logging.Benchmarks", "test\Serilog.Extensions.Logging.Benchmarks\Serilog.Extensions.Logging.Benchmarks.csproj", "{6D5986FF-EECD-4E75-8BC6-A5F78AB549B2}"

src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<PropertyGroup>
44
<Description>Low-level Serilog provider for Microsoft.Extensions.Logging</Description>
55
<!-- This must match the major and minor components of the referenced Microsoft.Extensions.Logging package. -->
6-
<VersionPrefix>7.0.1</VersionPrefix>
6+
<VersionPrefix>8.0.0</VersionPrefix>
77
<Authors>Microsoft;Serilog Contributors</Authors>
88
<!-- These must match the Dependencies tab in https://www.nuget.org/packages/microsoft.extensions.logging at
99
the target version. -->
10-
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
10+
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
1111
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1212
<PackageTags>serilog;Microsoft.Extensions.Logging</PackageTags>
1313
<PackageIcon>serilog-extension-nuget.png</PackageIcon>
@@ -31,7 +31,7 @@
3131
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
3232
<PackageReference Include="Serilog" Version="3.1.0-*" />
3333
<!-- The version of this reference must match the major and minor components of the package version prefix. -->
34-
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
34+
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-*" />
3535
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="All" />
3636
</ItemGroup>
3737

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
77

@@ -10,10 +10,10 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
14-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="All" />
15-
<PackageReference Include="xunit" Version="2.5.1" />
16-
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
14+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" PrivateAssets="All" />
15+
<PackageReference Include="xunit" Version="2.5.2" />
16+
<PackageReference Include="BenchmarkDotNet" Version="0.13.9" />
1717
</ItemGroup>
1818

1919
</Project>

test/Serilog.Extensions.Logging.Tests/Serilog.Extensions.Logging.Tests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0;net472</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net48</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
</PropertyGroup>
7-
8-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
7+
8+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net48' ">
99
<DefineConstants>$(DefineConstants);FORCE_W3C_ACTIVITY_ID</DefineConstants>
1010
</PropertyGroup>
1111

@@ -14,9 +14,9 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
18-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="all" />
19-
<PackageReference Include="xunit" Version="2.5.1" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
18+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" PrivateAssets="all" />
19+
<PackageReference Include="xunit" Version="2.5.2" />
2020
<PackageReference Include="Shouldly" Version="4.1.0" />
2121
<PackageReference Include="PublicApiGenerator" Version="11.0.0" />
2222
</ItemGroup>

0 commit comments

Comments
 (0)