Skip to content

Commit 0af2549

Browse files
Add support for .NET Framework 4.6.2, drop support for .NET Framework 4.5
The minimum .NET Framework supported in Visual Studio 2022 is .NET Framework 4.6.2 https://docs.microsoft.com/en-us/visualstudio/releases/2022/compatibility#-visual-studio-2022-support-for-net-development
1 parent 1b811f4 commit 0af2549

File tree

10 files changed

+23
-23
lines changed

10 files changed

+23
-23
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
A [Serilog](https://serilog.net) sink that writes log events to any WPF [RichTextBox](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/controls/richtextbox-overview?view=netframeworkdesktop-4.8) control with coloring and custom theme support.
1414

15-
[![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.RichTextBox.Wpf.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.RichTextBox.Wpf) [![.NET](https://img.shields.io/badge/.NET%20-%3E%3D%205.0-512bd4)](https://dotnet.microsoft.com/download) [![.NET Core](https://img.shields.io/badge/.NET%20Core-%3E%3D%203.1-512bd4)](https://dotnet.microsoft.com/download) [![.NET Framework](https://img.shields.io/badge/.NET%20Framework-%3E%3D%204.5-512bd4)](https://dotnet.microsoft.com/download) [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-serilog-orange.svg)](http://stackoverflow.com/questions/tagged/serilog)
15+
[![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.RichTextBox.Wpf.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.RichTextBox.Wpf) [![.NET](https://img.shields.io/badge/.NET%20-%3E%3D%205.0-512bd4)](https://dotnet.microsoft.com/download) [![.NET Core](https://img.shields.io/badge/.NET%20Core-%3E%3D%203.1-512bd4)](https://dotnet.microsoft.com/download) [![.NET Framework](https://img.shields.io/badge/.NET%20Framework-%3E%3D%204.6.2-512bd4)](https://dotnet.microsoft.com/download) [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-serilog-orange.svg)](http://stackoverflow.com/questions/tagged/serilog)
1616

1717
![Screenshot of Serilog.Sinks.RichTextBox.Wpf in action](asset/serilog-sinks-richtextbox-screenshot.png)
1818

@@ -50,7 +50,7 @@ Then enable the sink using `WriteTo.RichTextBox()`:
5050
Log.Logger = new LoggerConfiguration()
5151
.WriteTo.RichTextBox(MyRichTextBox)
5252
.CreateLogger();
53-
53+
5454
Log.Information("Hello, world!");
5555
```
5656

@@ -74,7 +74,7 @@ Themes can be specified when configuring the sink:
7474

7575
The following built-in themes are available at this time:
7676

77-
| Theme | Description
77+
| Theme | Description
7878
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
7979
| `RichTextBoxTheme.None` | No styling. Uses default styles applied to the `RichTextBox` control |
8080
| `RichTextBoxConsoleTheme.Literate` | Styled to replicate the default theme of _Serilog.Sinks.Console_; **This is the default when no theme is specified** |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<Application x:Class="WpfNet45Sample.App"
1+
<Application x:Class="WpfNet462Sample.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:WpfNet45Sample"
4+
xmlns:local="clr-namespace:WpfNet462Sample"
55
StartupUri="MainWindow.xaml">
66
<Application.Resources>
7-
7+
88
</Application.Resources>
99
</Application>

sample/WpfNet45Sample/App.xaml.cs renamed to sample/WpfNet462Sample/App.xaml.cs

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

22-
namespace WpfNet45Sample
22+
namespace WpfNet462Sample
2323
{
2424
/// <summary>
2525
/// Interaction logic for App.xaml

sample/WpfNet45Sample/MainWindow.xaml renamed to sample/WpfNet462Sample/MainWindow.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<Window x:Class="WpfNet45Sample.MainWindow"
1+
<Window x:Class="WpfNet462Sample.MainWindow"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:local="clr-namespace:WpfNet45Sample"
6+
xmlns:local="clr-namespace:WpfNet462Sample"
77
mc:Ignorable="d"
8-
Title="MainWindow (WPF on .NET Framework 4.5)"
8+
Title="MainWindow (WPF on .NET Framework 4.6.2)"
99
Width="800"
1010
Height="600"
1111
Background="Black"

sample/WpfNet45Sample/MainWindow.xaml.cs renamed to sample/WpfNet462Sample/MainWindow.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
using Serilog;
2424
using Serilog.Debugging;
2525

26-
namespace WpfNet45Sample
26+
namespace WpfNet462Sample
2727
{
2828
/// <summary>
2929
/// Interaction logic for MainWindow.xaml
@@ -142,10 +142,10 @@ private async void LogTaskRun_OnClick(object sender, RoutedEventArgs e)
142142
Log.Error("Hello from Task.Run({StepName}) Error", stepName);
143143
Log.Fatal("Hello from Task.Run({StepName}) Fatal", stepName);
144144
});
145-
145+
146146
tasks.Add(task);
147147
}
148-
148+
149149
await Task.WhenAll(tasks);
150150
}
151151
}

sample/WpfNet45Sample/WpfNet45Sample.csproj renamed to sample/WpfNet462Sample/WpfNet462Sample.csproj

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

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net45</TargetFramework>
5+
<TargetFramework>net462</TargetFramework>
66
<UseWPF>true</UseWPF>
77
</PropertyGroup>
88

serilog-sinks-richtextbox.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{45E3C95E-AA8
1111
EndProject
1212
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.RichTextBox.Wpf", "src\Serilog.Sinks.RichTextBox.Wpf\Serilog.Sinks.RichTextBox.Wpf.csproj", "{63C19AE3-4AFC-4D86-ADBA-C49A220A3F7F}"
1313
EndProject
14-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfNet45Sample", "sample\WpfNet45Sample\WpfNet45Sample.csproj", "{1BB75390-59CF-4EB4-AC86-A28F5493C699}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfNet462Sample", "sample\WpfNet462Sample\WpfNet462Sample.csproj", "{1BB75390-59CF-4EB4-AC86-A28F5493C699}"
1515
EndProject
1616
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F117EDB3-857E-491C-98B0-325415BD589E}"
1717
EndProject

src/Serilog.Sinks.RichTextBox.Wpf/Serilog.Sinks.RichTextBox.Wpf.csproj

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-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net462</TargetFrameworks>
55
<UseWPF>true</UseWPF>
66
<RootNamespace>Serilog</RootNamespace>
77

@@ -46,10 +46,10 @@
4646
</PropertyGroup>
4747

4848
<PropertyGroup>
49-
<DisableImplicitFrameworkReferences Condition=" '$(TargetFramework)' == 'net45' ">true</DisableImplicitFrameworkReferences>
49+
<DisableImplicitFrameworkReferences Condition=" '$(TargetFramework)' == 'net462' ">true</DisableImplicitFrameworkReferences>
5050
</PropertyGroup>
5151

52-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
52+
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
5353
<Reference Include="System" />
5454
<Reference Include="System.Core" />
5555
<Reference Include="Microsoft.CSharp" />
@@ -70,8 +70,8 @@
7070
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
7171
</ItemGroup>
7272

73-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
74-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
73+
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
74+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
7575
<Reference Include="PresentationCore" />
7676
<Reference Include="PresentationFramework" />
7777
<Reference Include="System" />

test/Serilog.Sinks.RichTextBox.Wpf.Tests/Serilog.Sinks.RichTextBox.Wpf.Tests.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-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net462</TargetFrameworks>
55
<AssemblyName>Serilog.Sinks.RichTextBox.Wpf.Tests</AssemblyName>
66
<IsPackable>false</IsPackable>
77
<AssemblyOriginatorKeyFile>../../asset/Serilog.snk</AssemblyOriginatorKeyFile>
@@ -27,8 +27,8 @@
2727
<PackageReference Include="FluentAssertions" Version="5.10.3" />
2828
</ItemGroup>
2929

30-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
31-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
30+
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
31+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
3232
<Reference Include="PresentationCore" />
3333
<Reference Include="PresentationFramework" />
3434
<Reference Include="System" />

0 commit comments

Comments
 (0)