Skip to content

Commit

Permalink
(Non-building) v7; waiting for Serilog.Extensions.Hosting and Serilog…
Browse files Browse the repository at this point in the history
….Settings.Configuration v7-dev-*.
  • Loading branch information
nblumhardt committed May 3, 2023
1 parent 01f95fb commit 045ea0b
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 102 deletions.
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": "6.0.401",
"version": "7.0.100",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion samples/Sample/Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

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

<ItemGroup>
Expand Down
14 changes: 14 additions & 0 deletions serilog-aspnetcore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.AspNetCore.Tests",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "samples\Sample\Sample.csproj", "{4FA0FE41-973E-4555-AB4A-0F400DBA9DD3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extensions.Logging", "..\serilog-extensions-logging\src\Serilog.Extensions.Logging\Serilog.Extensions.Logging.csproj", "{03EC6680-9D1F-4D51-A1F4-E6863781982B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Extensions.Hosting", "..\serilog-extensions-hosting\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj", "{49220185-3DA4-49C1-B08C-F5C38F53378B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -44,6 +48,14 @@ Global
{4FA0FE41-973E-4555-AB4A-0F400DBA9DD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FA0FE41-973E-4555-AB4A-0F400DBA9DD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FA0FE41-973E-4555-AB4A-0F400DBA9DD3}.Release|Any CPU.Build.0 = Release|Any CPU
{03EC6680-9D1F-4D51-A1F4-E6863781982B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03EC6680-9D1F-4D51-A1F4-E6863781982B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03EC6680-9D1F-4D51-A1F4-E6863781982B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03EC6680-9D1F-4D51-A1F4-E6863781982B}.Release|Any CPU.Build.0 = Release|Any CPU
{49220185-3DA4-49C1-B08C-F5C38F53378B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49220185-3DA4-49C1-B08C-F5C38F53378B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49220185-3DA4-49C1-B08C-F5C38F53378B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49220185-3DA4-49C1-B08C-F5C38F53378B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -52,6 +64,8 @@ Global
{0549D23F-986B-4FB2-BACE-16FD7A7BC9EF} = {A1893BD1-333D-4DFE-A0F0-DDBB2FE526E0}
{AD51759B-CD58-473F-9620-0B0E56A123A1} = {E30F638E-BBBE-4AD1-93CE-48CC69CFEFE1}
{4FA0FE41-973E-4555-AB4A-0F400DBA9DD3} = {F2407211-6043-439C-8E06-3641634332E7}
{03EC6680-9D1F-4D51-A1F4-E6863781982B} = {A1893BD1-333D-4DFE-A0F0-DDBB2FE526E0}
{49220185-3DA4-49C1-B08C-F5C38F53378B} = {A1893BD1-333D-4DFE-A0F0-DDBB2FE526E0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {811E61C5-3871-4633-AFAE-B35B619C8A10}
Expand Down
2 changes: 1 addition & 1 deletion src/Serilog.AspNetCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyVersion("7.0.0.0")]

[assembly: InternalsVisibleTo("Serilog.AspNetCore.Tests, PublicKey=" +
"0024000004800000940000000602000000240000525341310004000001000100fb8d13fd344a1c" +
Expand Down
47 changes: 17 additions & 30 deletions src/Serilog.AspNetCore/Serilog.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

<PropertyGroup>
<Description>Serilog support for ASP.NET Core logging</Description>
<VersionPrefix>6.1.1</VersionPrefix>
<!-- This must match the major and minor components of the referenced *.Extensions.* packages (and highest supported .NET TFM). -->
<VersionPrefix>7.0.0</VersionPrefix>
<Authors>Microsoft;Serilog Contributors</Authors>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>serilog;aspnet;aspnetcore</PackageTags>
<PackageIcon>icon.png</PackageIcon>
Expand All @@ -20,44 +21,30 @@
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)' != 'netstandard2.0' and '$(TargetFramework)' != 'netstandard2.1'">
<DefineConstants>$(DefineConstants);HOSTBUILDER</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
<ItemGroup>
<!-- The versions of all references in this group must match the major and minor components of the package version prefix. -->
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
<ProjectReference Include="../../../serilog-extensions-hosting/src/Serilog.Extensions.Hosting/Serilog.Extensions.Hosting.csproj" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<ItemGroup Condition=" '$(TargetFramework)' != 'net462' and '$(TargetFramework)' != 'netstandard2.0' and '$(TargetFramework)' != 'netstandard2.1' ">
<!-- I.e. all modern/supported non-Framework .NET SKUs -->
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
</ItemGroup>

</Project>
8 changes: 2 additions & 6 deletions src/Serilog.AspNetCore/SerilogWebHostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ public static class SerilogWebHostBuilderExtensions
/// <c>WriteTo.Providers()</c> configuration method, enabling other <see cref="ILoggerProvider"/>s to receive events. By
/// default, only Serilog sinks will receive events.</param>
/// <returns>The web host builder.</returns>
#if HOSTBUILDER
[Obsolete("Prefer UseSerilog() on IHostBuilder")]
#endif
[Obsolete("Prefer UseSerilog() on IHostBuilder")]
public static IWebHostBuilder UseSerilog(
this IWebHostBuilder builder,
ILogger? logger = null,
Expand Down Expand Up @@ -85,9 +83,7 @@ public static IWebHostBuilder UseSerilog(
/// the Microsoft.Extensions.Logging API. Normally, equivalent Serilog sinks are used in place of providers. Specify
/// <c>true</c> to write events to all providers.</param>
/// <returns>The web host builder.</returns>
#if HOSTBUILDER
[Obsolete("Prefer UseSerilog() on IHostBuilder")]
#endif
[Obsolete("Prefer UseSerilog() on IHostBuilder")]
public static IWebHostBuilder UseSerilog(
this IWebHostBuilder builder,
Action<WebHostBuilderContext, LoggerConfiguration> configureLogger,
Expand Down
15 changes: 4 additions & 11 deletions test/Serilog.AspNetCore.Tests/Serilog.AspNetCore.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFramework>net7.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

Expand All @@ -11,16 +11,9 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.4.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.5" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="5.0.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.5" />
</ItemGroup>

</Project>
Loading

0 comments on commit 045ea0b

Please sign in to comment.