Skip to content

Commit b680ba7

Browse files
committed
Removed .NET Core 3.1 and updated to .NET 6.0
1 parent a161ad1 commit b680ba7

File tree

23 files changed

+68
-157
lines changed

23 files changed

+68
-157
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A Serilog sink that writes events to Microsoft SQL Server. This sink will write the log event data to a table and can optionally also store the properties inside an XML or JSON column so they can be queried. Important properties can also be written to their own separate columns.
44

55
**Package** - [Serilog.Sinks.MSSqlServer](http://nuget.org/packages/serilog.sinks.mssqlserver)
6-
| **Minimum Platforms** - .NET Framework 4.6.2, .NET Core 3.1, .NET Standard 2.0
6+
| **Minimum Platforms** - .NET Framework 4.6.2, .NET 6.0, .NET Standard 2.0
77

88
#### Topics
99

@@ -90,8 +90,8 @@ Because of the way external configuration has been implemented in various .NET f
9090
| .NET Framework 4.6.2+ | `net462` | app or library | _System.Configuration_ |
9191
| .NET Framework 4.6.2+ | `net462` | app or library | _Microsoft.Extensions.Configuration_ |
9292
| .NET Standard 2.0 | `netstandard2.0` | library only | _Microsoft.Extensions.Configuration_ |
93-
| .NET Core 3.1+ | `netcoreapp3.1` | app or library | _System.Configuration_ |
94-
| .NET Core 3.1+ | `netcoreapp3.1` | app or library | _Microsoft.Extensions.Configuration_ |
93+
| .NET 6.0+ | `net6.0` | app or library | _System.Configuration_ |
94+
| .NET 6.0+ | `net6.0` | app or library | _Microsoft.Extensions.Configuration_ |
9595

9696
Although it's possible to use both XML and _M.E.C_ configuration with certain frameworks, this is not supported, unintended consequences are possible, and a warning will be emitted to `SelfLog`. If you actually require multiple configuration sources, the _M.E.C_ builder-pattern is designed to support this, and your syntax will be consistent across configuration sources.
9797

sample/AppConfigDemo/App.config

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<section name="MSSqlServerSettingsSection" type="Serilog.Configuration.MSSqlServerConfigurationSection, Serilog.Sinks.MSSqlServer" />
55
</configSections>
66
<startup>
7-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
7+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
88
</startup>
99
<MSSqlServerSettingsSection>
1010

@@ -21,52 +21,4 @@
2121
<TimeStamp ColumnName="TimeStampAlternative" ConvertToUtc="true" />
2222

2323
</MSSqlServerSettingsSection>
24-
<runtime>
25-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
26-
<dependentAssembly>
27-
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
28-
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
29-
</dependentAssembly>
30-
<dependentAssembly>
31-
<assemblyIdentity name="Microsoft.Extensions.Primitives" publicKeyToken="adb9793829ddae60" culture="neutral" />
32-
<bindingRedirect oldVersion="0.0.0.0-3.1.4.0" newVersion="3.1.4.0" />
33-
</dependentAssembly>
34-
<dependentAssembly>
35-
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
36-
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
37-
</dependentAssembly>
38-
<dependentAssembly>
39-
<assemblyIdentity name="Microsoft.Identity.Client" publicKeyToken="0a613f4dd989e8ae" culture="neutral" />
40-
<bindingRedirect oldVersion="0.0.0.0-4.45.0.0" newVersion="4.45.0.0" />
41-
</dependentAssembly>
42-
<dependentAssembly>
43-
<assemblyIdentity name="Microsoft.IdentityModel.Protocols.OpenIdConnect" publicKeyToken="31bf3856ad364e35" culture="neutral" />
44-
<bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
45-
</dependentAssembly>
46-
<dependentAssembly>
47-
<assemblyIdentity name="Microsoft.IdentityModel.Protocols" publicKeyToken="31bf3856ad364e35" culture="neutral" />
48-
<bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
49-
</dependentAssembly>
50-
<dependentAssembly>
51-
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
52-
<bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
53-
</dependentAssembly>
54-
<dependentAssembly>
55-
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
56-
<bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
57-
</dependentAssembly>
58-
<dependentAssembly>
59-
<assemblyIdentity name="Microsoft.IdentityModel.JsonWebTokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
60-
<bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
61-
</dependentAssembly>
62-
<dependentAssembly>
63-
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
64-
<bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
65-
</dependentAssembly>
66-
<dependentAssembly>
67-
<assemblyIdentity name="Microsoft.IdentityModel.Abstractions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
68-
<bindingRedirect oldVersion="0.0.0.0-6.21.0.0" newVersion="6.21.0.0" />
69-
</dependentAssembly>
70-
</assemblyBinding>
71-
</runtime>
7224
</configuration>

sample/AppConfigDemo/AppConfigDemo.csproj

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{7DC530B1-68FD-4F07-A2F9-910C338562C1}</ProjectGuid>
7+
<ProjectGuid>{6BFE1D21-1442-4375-AB69-14160B906A64}</ProjectGuid>
88
<OutputType>Exe</OutputType>
99
<RootNamespace>AppConfigDemo</RootNamespace>
1010
<AssemblyName>AppConfigDemo</AssemblyName>
1111
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1414
<Deterministic>true</Deterministic>
15-
<NuGetPackageImportStamp>
16-
</NuGetPackageImportStamp>
1715
</PropertyGroup>
1816
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1917
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -35,37 +33,19 @@
3533
<WarningLevel>4</WarningLevel>
3634
</PropertyGroup>
3735
<ItemGroup>
38-
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=3.1.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
39-
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.4\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
40-
</Reference>
41-
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
42-
<HintPath>..\..\packages\Serilog.2.9.0\lib\net46\Serilog.dll</HintPath>
43-
</Reference>
4436
<Reference Include="System" />
45-
<Reference Include="System.Configuration" />
4637
<Reference Include="System.Core" />
47-
<Reference Include="System.Data.Common, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
48-
<HintPath>..\..\packages\System.Data.Common.4.3.0\lib\net451\System.Data.Common.dll</HintPath>
49-
<Private>True</Private>
50-
<Private>True</Private>
51-
</Reference>
52-
<Reference Include="System.Drawing" />
53-
<Reference Include="System.IdentityModel" />
54-
<Reference Include="System.Numerics" />
55-
<Reference Include="System.Windows.Forms" />
5638
<Reference Include="System.Xml.Linq" />
5739
<Reference Include="System.Data.DataSetExtensions" />
5840
<Reference Include="Microsoft.CSharp" />
5941
<Reference Include="System.Data" />
60-
<Reference Include="System.Net.Http" />
6142
<Reference Include="System.Xml" />
6243
</ItemGroup>
6344
<ItemGroup>
6445
<Compile Include="Program.cs" />
6546
</ItemGroup>
6647
<ItemGroup>
6748
<None Include="App.config" />
68-
<None Include="packages.config" />
6949
</ItemGroup>
7050
<ItemGroup>
7151
<ProjectReference Include="..\..\src\Serilog.Sinks.MSSqlServer\Serilog.Sinks.MSSqlServer.csproj">
@@ -76,12 +56,10 @@
7656
<ItemGroup>
7757
<Folder Include="Properties\" />
7858
</ItemGroup>
59+
<ItemGroup>
60+
<PackageReference Include="Serilog">
61+
<Version>2.5.0</Version>
62+
</PackageReference>
63+
</ItemGroup>
7964
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
80-
<Import Project="..\..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets" Condition="Exists('..\..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" />
81-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
82-
<PropertyGroup>
83-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
84-
</PropertyGroup>
85-
<Error Condition="!Exists('..\..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Data.SqlClient.SNI.1.1.0\build\net46\Microsoft.Data.SqlClient.SNI.targets'))" />
86-
</Target>
8765
</Project>

sample/AppConfigDemo/packages.config

Lines changed: 0 additions & 20 deletions
This file was deleted.

sample/CombinedConfigDemo/CombinedConfigDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

sample/CustomLogEventFormatterDemo/CustomLogEventFormatterDemo.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

sample/NetStandardDemo/NetStandardDemoApp/NetStandardDemoApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

sample/WorkerServiceDemo/WorkerServiceDemo.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<UserSecretsId>dotnet-WorkerServiceDemo-A4DFF8A6-AC69-443B-A3B8-34E284CD1C78</UserSecretsId>
66
</PropertyGroup>
77

serilog-sinks-mssqlserver.sln

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29806.167
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.32916.344
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04226074-C72F-42BC-AB02-4D70A7BAE7E1}"
77
EndProject
@@ -15,8 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{AA3463
1515
EndProject
1616
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomLogEventFormatterDemo", "sample\CustomLogEventFormatterDemo\CustomLogEventFormatterDemo.csproj", "{873320F1-8F6D-45E2-A853-D321C86793EC}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppConfigDemo", "sample\AppConfigDemo\AppConfigDemo.csproj", "{7DC530B1-68FD-4F07-A2F9-910C338562C1}"
19-
EndProject
2018
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkerServiceDemo", "sample\WorkerServiceDemo\WorkerServiceDemo.csproj", "{04F523D9-F00B-4C63-9287-31A244378E06}"
2119
EndProject
2220
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CombinedConfigDemo", "sample\CombinedConfigDemo\CombinedConfigDemo.csproj", "{98F21125-AF7A-46E8-8C08-E3E4F5DBEDB9}"
@@ -30,12 +28,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
3028
README.md = README.md
3129
EndProjectSection
3230
EndProject
33-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetStandardDemoLib", "sample\NetStandardDemo\NetStandardDemoLib\NetStandardDemoLib.csproj", "{8E69E31B-61C7-4175-B886-9C2078FCA477}"
31+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetStandardDemoLib", "sample\NetStandardDemo\NetStandardDemoLib\NetStandardDemoLib.csproj", "{8E69E31B-61C7-4175-B886-9C2078FCA477}"
3432
EndProject
35-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetStandardDemoApp", "sample\NetStandardDemo\NetStandardDemoApp\NetStandardDemoApp.csproj", "{F908C46D-E72E-41E4-975D-73733294F93F}"
33+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetStandardDemoApp", "sample\NetStandardDemo\NetStandardDemoApp\NetStandardDemoApp.csproj", "{F908C46D-E72E-41E4-975D-73733294F93F}"
3634
EndProject
3735
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NetStandardDemo", "NetStandardDemo", "{7B2B80DE-427A-4FEC-A7CE-7AD81FED73DE}"
3836
EndProject
37+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppConfigDemo", "sample\AppConfigDemo\AppConfigDemo.csproj", "{6BFE1D21-1442-4375-AB69-14160B906A64}"
38+
EndProject
3939
Global
4040
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4141
Debug|Any CPU = Debug|Any CPU
@@ -54,10 +54,6 @@ Global
5454
{873320F1-8F6D-45E2-A853-D321C86793EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
5555
{873320F1-8F6D-45E2-A853-D321C86793EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
5656
{873320F1-8F6D-45E2-A853-D321C86793EC}.Release|Any CPU.Build.0 = Release|Any CPU
57-
{7DC530B1-68FD-4F07-A2F9-910C338562C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
58-
{7DC530B1-68FD-4F07-A2F9-910C338562C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
59-
{7DC530B1-68FD-4F07-A2F9-910C338562C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
60-
{7DC530B1-68FD-4F07-A2F9-910C338562C1}.Release|Any CPU.Build.0 = Release|Any CPU
6157
{04F523D9-F00B-4C63-9287-31A244378E06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6258
{04F523D9-F00B-4C63-9287-31A244378E06}.Debug|Any CPU.Build.0 = Debug|Any CPU
6359
{04F523D9-F00B-4C63-9287-31A244378E06}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -74,6 +70,10 @@ Global
7470
{F908C46D-E72E-41E4-975D-73733294F93F}.Debug|Any CPU.Build.0 = Debug|Any CPU
7571
{F908C46D-E72E-41E4-975D-73733294F93F}.Release|Any CPU.ActiveCfg = Release|Any CPU
7672
{F908C46D-E72E-41E4-975D-73733294F93F}.Release|Any CPU.Build.0 = Release|Any CPU
73+
{6BFE1D21-1442-4375-AB69-14160B906A64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
74+
{6BFE1D21-1442-4375-AB69-14160B906A64}.Debug|Any CPU.Build.0 = Debug|Any CPU
75+
{6BFE1D21-1442-4375-AB69-14160B906A64}.Release|Any CPU.ActiveCfg = Release|Any CPU
76+
{6BFE1D21-1442-4375-AB69-14160B906A64}.Release|Any CPU.Build.0 = Release|Any CPU
7777
EndGlobalSection
7878
GlobalSection(SolutionProperties) = preSolution
7979
HideSolutionNode = FALSE
@@ -82,12 +82,12 @@ Global
8282
{803CD13A-D54B-4CEC-A55F-E22AE3D93B3C} = {04226074-C72F-42BC-AB02-4D70A7BAE7E1}
8383
{3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {F02D6513-6F45-452E-85A0-41A872A2C1F8}
8484
{873320F1-8F6D-45E2-A853-D321C86793EC} = {AA346332-5BAF-47F1-B8FB-7600ED61265D}
85-
{7DC530B1-68FD-4F07-A2F9-910C338562C1} = {AA346332-5BAF-47F1-B8FB-7600ED61265D}
8685
{04F523D9-F00B-4C63-9287-31A244378E06} = {AA346332-5BAF-47F1-B8FB-7600ED61265D}
8786
{98F21125-AF7A-46E8-8C08-E3E4F5DBEDB9} = {AA346332-5BAF-47F1-B8FB-7600ED61265D}
8887
{8E69E31B-61C7-4175-B886-9C2078FCA477} = {7B2B80DE-427A-4FEC-A7CE-7AD81FED73DE}
8988
{F908C46D-E72E-41E4-975D-73733294F93F} = {7B2B80DE-427A-4FEC-A7CE-7AD81FED73DE}
9089
{7B2B80DE-427A-4FEC-A7CE-7AD81FED73DE} = {AA346332-5BAF-47F1-B8FB-7600ED61265D}
90+
{6BFE1D21-1442-4375-AB69-14160B906A64} = {AA346332-5BAF-47F1-B8FB-7600ED61265D}
9191
EndGlobalSection
9292
GlobalSection(ExtensibilityGlobals) = postSolution
9393
SolutionGuid = {AAA6BF8D-7B53-4A5F-A79A-D1B306383B45}

src/Serilog.Sinks.MSSqlServer/Configuration/Extensions/Hybrid/LoggerConfigurationMSSqlServerExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
using Serilog.Sinks.MSSqlServer.Configuration.Factories;
2323

2424
// The "Hybrid" configuration system supports both Microsoft.Extensions.Configuration and System.Configuration.
25-
// This is necessary because .NET Framework 4.6.1+ and .NET Core 2.0+ apps support both approaches, whereas the
25+
// This is necessary because .NET Framework 4.6.2+ and .NET Core 2.0+ apps support both approaches, whereas the
2626

2727
namespace Serilog
2828
{

0 commit comments

Comments
 (0)