Skip to content

Commit

Permalink
Merge pull request #80 from nblumhardt/dotnet-8
Browse files Browse the repository at this point in the history
Update to .NET 8 RTM and Serilog 3.1.1
  • Loading branch information
nblumhardt authored Nov 15, 2023
2 parents 52f29a6 + 260e84d commit 2b8e221
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 29 deletions.
5 changes: 4 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ skip_tags: true
image: Visual Studio 2022
test: off
build_script:
- ps: ./Build.ps1
- pwsh: |
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./dotnet-install.ps1"
./dotnet-install.ps1 -JSonFile global.json -Architecture x64 -InstallDir 'C:\Program Files\dotnet'
./Build.ps1
artifacts:
- path: artifacts/Serilog.*.nupkg
skip_commits:
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"allowPrerelease": false,
"version": "7.0.100",
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
3 changes: 1 addition & 2 deletions samples/SimpleServiceSample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.IO;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
Expand Down Expand Up @@ -38,6 +36,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
.ConfigureServices(services => services.AddHostedService<PrintTimeService>())
.UseSerilog((context, services, loggerConfiguration) => loggerConfiguration
.ReadFrom.Configuration(context.Configuration)
.ReadFrom.Services(services)
.Enrich.FromLogContext()
.WriteTo.Console());
}
Expand Down
8 changes: 4 additions & 4 deletions samples/SimpleServiceSample/SimpleServiceSample.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
</ItemGroup>

</Project>
5 changes: 0 additions & 5 deletions samples/WebApplicationSample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;

namespace WebApplicationSample
Expand Down
8 changes: 4 additions & 4 deletions samples/WebApplicationSample/WebApplicationSample.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="serilog.settings.configuration" Version="3.1.0" />
<PackageReference Include="serilog.sinks.console" Version="3.1.1" />
<PackageReference Include="serilog.sinks.file" Version="4.1.0" />
<PackageReference Include="serilog.settings.configuration" Version="8.0.0" />
<PackageReference Include="serilog.sinks.console" Version="5.0.0" />
<PackageReference Include="serilog.sinks.file" Version="5.0.0" />
</ItemGroup>

</Project>
16 changes: 9 additions & 7 deletions src/Serilog.Extensions.Hosting/Serilog.Extensions.Hosting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<PropertyGroup>
<Description>Serilog support for .NET Core logging in hosted services</Description>
<!-- This must match the major and minor components of the referenced Microsoft.Extensions.Logging package. -->
<VersionPrefix>7.0.0</VersionPrefix>
<VersionPrefix>8.0.0</VersionPrefix>
<Authors>Microsoft;Serilog Contributors</Authors>
<!-- These must match the Dependencies tab in https://www.nuget.org/packages/microsoft.extensions.hosting at
the target version. -->
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>8</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand All @@ -22,6 +22,7 @@
<RepositoryType>git</RepositoryType>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<RootNamespace>Serilog</RootNamespace>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' ">
Expand All @@ -30,15 +31,16 @@

<ItemGroup>
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" />
<None Include="..\..\README.md" Pack="true" PackagePath="\" Visible="false" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog" Version="3.1.1" />
</ItemGroup>

<ItemGroup>
<!-- The versions of all references in this group must match the major and minor components of the package version prefix. -->
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net4.8</TargetFrameworks>
<TargetFrameworks>net4.8;net6.0;net7.0;net8.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
Expand All @@ -17,10 +17,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.6.1" />
</ItemGroup>

</Project>

0 comments on commit 2b8e221

Please sign in to comment.