Skip to content

Commit bae1a17

Browse files
committed
Removed support for obsolete .NET Framework 4.5.2
1 parent 2ea673b commit bae1a17

File tree

8 files changed

+5
-38
lines changed

8 files changed

+5
-38
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ If you are opening a feature request, you can ignore this template. Bug reports
1919
[ ] .NET Framework 4.8
2020
[ ] .NET Framework 4.7
2121
[ ] .NET Framework 4.6.x
22-
[ ] .NET Framework 4.5.x
2322
OS:
2423

2524
>> Provide a *simple* reproduction of your Serilog configuration code:

README.md

Lines changed: 1 addition & 4 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.5.2, .NET Core 3.1, .NET Standard 2.0
6+
| **Minimum Platforms** - .NET Framework 4.6.2, .NET Core 3.1, .NET Standard 2.0
77

88
#### Topics
99

@@ -87,15 +87,12 @@ Because of the way external configuration has been implemented in various .NET f
8787

8888
| Your Framework | TFM | Project Types | External Configuration |
8989
| --- | --- | --- | --- |
90-
| .NET Framework 4.5.2 | `net452` | app or library | _System.Configuration_ |
9190
| .NET Framework 4.6.2+ | `net462` | app or library | _System.Configuration_ |
9291
| .NET Framework 4.6.2+ | `net462` | app or library | _Microsoft.Extensions.Configuration_ |
9392
| .NET Standard 2.0 | `netstandard2.0` | library only | _Microsoft.Extensions.Configuration_ |
9493
| .NET Core 3.1+ | `netcoreapp3.1` | app or library | _System.Configuration_ |
9594
| .NET Core 3.1+ | `netcoreapp3.1` | app or library | _Microsoft.Extensions.Configuration_ |
9695

97-
Support for .NET Framework 4.5.2 is tied to the Windows 8.1 lifecycle with support scheduled to end in April 2022 (https://devblogs.microsoft.com/dotnet/net-framework-4-5-2-4-6-4-6-1-will-reach-end-of-support-on-april-26-2022/).
98-
9996
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.
10097

10198
### Code-Only (any .NET target)

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
// The "Hybrid" configuration system supports both Microsoft.Extensions.Configuration and System.Configuration.
2525
// This is necessary because .NET Framework 4.6.1+ and .NET Core 2.0+ apps support both approaches, whereas the
26-
// older .NET Framework 4.5.2 only supports System.Configuration and .NET Standard 2.0 only supports M.E.C.
2726

2827
namespace Serilog
2928
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
using Serilog.Sinks.MSSqlServer;
2020
using Serilog.Sinks.MSSqlServer.Configuration.Factories;
2121

22-
// System.Configuration support for .NET Framework 4.5.2 libraries and apps.
22+
// System.Configuration support for .NET Framework 4.6.2 libraries and apps.
2323

2424
namespace Serilog
2525
{

src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Description>A Serilog sink that writes events to Microsoft SQL Server</Description>
55
<VersionPrefix>5.7.1</VersionPrefix>
66
<Authors>Michiel van Oudheusden;Christian Kadluba;Serilog Contributors</Authors>
7-
<TargetFrameworks>netstandard2.0;net452;net462;net472;netcoreapp3.1</TargetFrameworks>
7+
<TargetFrameworks>netstandard2.0;net462;net472;netcoreapp3.1</TargetFrameworks>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<AssemblyName>Serilog.Sinks.MSSqlServer</AssemblyName>
@@ -29,7 +29,6 @@
2929
</PropertyGroup>
3030

3131
<ItemGroup>
32-
<!-- Whenever these are updated, also update versions in packages.config for net452 -->
3332
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
3433
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
3534
<PrivateAssets>all</PrivateAssets>
@@ -90,18 +89,6 @@
9089
<Compile Include="Sinks\MSSqlServer\Platform\AzureManagedServiceAuthenticator.cs" />
9190
</ItemGroup>
9291

93-
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
94-
<Reference Include="System.Data" />
95-
<Reference Include="System.Xml" />
96-
<Reference Include="System.Xml.Linq" />
97-
<Reference Include="System.Configuration" />
98-
<Reference Include="System" />
99-
<Reference Include="Microsoft.CSharp" />
100-
<Compile Include="Configuration\Extensions\System.Configuration\**\*.cs" />
101-
<Compile Include="Configuration\Implementations\System.Configuration\**\*.cs" />
102-
<Compile Include="Sinks\MSSqlServer\Platform\AzureManagedServiceAuthenticatorStub.cs" />
103-
</ItemGroup>
104-
10592
<ItemGroup>
10693
<None Include="Configuration\Factories\IMSSqlServerSinkFactory.cs" />
10794
<None Include="Configuration\Factories\MSSqlServerSinkFactory.cs" />

src/Serilog.Sinks.MSSqlServer/packages.config

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

test/Serilog.Sinks.MSSqlServer.Tests/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<section name="SinkOptionsConfig" type="Serilog.Configuration.MSSqlServerConfigurationSection, Serilog.Sinks.MSSqlServer"/>
88
</configSections>
99
<startup>
10-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
10+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
1111
</startup>
1212

1313
<connectionStrings>

test/Serilog.Sinks.MSSqlServer.Tests/Serilog.Sinks.MSSqlServer.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net452;net462;net472;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net462;net472;netcoreapp3.1</TargetFrameworks>
55
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0</TargetFrameworks>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
77
<AssemblyName>Serilog.Sinks.MSSqlServer.Tests</AssemblyName>
@@ -38,15 +38,6 @@
3838
<!-- ItemGroups below with TFM conditions will re-include the compile targets -->
3939
</ItemGroup>
4040

41-
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
42-
<Reference Include="System" />
43-
<Reference Include="System.Transactions" />
44-
<Reference Include="Microsoft.CSharp" />
45-
<PackageReference Include="xunit" Version="2.4.1" />
46-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
47-
<Compile Include="Configuration\Extensions\System.Configuration\**\*.cs" />
48-
</ItemGroup>
49-
5041
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
5142
<Reference Include="System" />
5243
<Reference Include="System.Transactions" />

0 commit comments

Comments
 (0)