Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: removed .NET 7 target framework (EOL) #112

Merged
merged 2 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ env:
DOTNET_NOLOGO: true
dotnet-version: |
8.0.x
7.0.x
6.0.x
3.1.x

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
DOTNET_NOLOGO: true
dotnet-version: |
8.0.x
7.0.x
6.0.x
3.1.x

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
DOTNET_NOLOGO: true
dotnet-version: |
8.0.x
7.0.x
6.0.x
3.1.x

Expand Down
4 changes: 0 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
<PackageVersion_Microsoft_Extensions>8.0.0</PackageVersion_Microsoft_Extensions>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net7.0'">
<PackageVersion_Microsoft_Extensions>7.0.0</PackageVersion_Microsoft_Extensions>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net6.0'">
<PackageVersion_Microsoft_Extensions>6.0.0</PackageVersion_Microsoft_Extensions>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ Please consider that .NET Core 3.1 and up now has built-in support for [W3C Trac
## More info

### Supported .NET targets
- .NET 6.0, .NET 7.0
- .NET 6.0, .NET 8.0
- .NET Standard 2.0/.NET Core 3.1

### ASP.NET Core support
- ASP.NET Core 3.1/6.0/7.0
- ASP.NET Core 6.0/8.0

### Build requirements
- Visual Studio 2022
- .NET 7 SDK
- .NET 8 SDK
- .NET 6 SDK
- .NET 3.1 SDK

Expand Down
8 changes: 4 additions & 4 deletions examples/Serilog/Client/Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

<ItemGroup>
Expand All @@ -18,9 +18,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Correlate.DependencyInjection" Version="4.0.0" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Correlate.DependencyInjection" Version="5.2.0" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="ReadLine" Version="2.0.1" />
</ItemGroup>

Expand Down
17 changes: 10 additions & 7 deletions examples/Serilog/Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

builder.WebHost
.UseSerilog((ctx, loggerConfig) => loggerConfig
.ReadFrom.Configuration(ctx.Configuration)
.Enrich.FromLogContext()
// Add the property to the template explicitly, or log all properties with {Properties}.
.WriteTo.Console(outputTemplate: "Message: {Message:lj}{NewLine}\tCorrelation ID: {CorrelationId}{NewLine}")
.WriteTo.Debug()
builder.Services
.AddLogging(configure => configure.AddSerilog(
new LoggerConfiguration()
.ReadFrom.Configuration(builder.Configuration)
.Enrich.FromLogContext()
// Add the property to the template explicitly, or log all properties with {Properties}.
.WriteTo.Console(outputTemplate: "Message: {Message:lj}{NewLine}\tCorrelation ID: {CorrelationId}{NewLine}")
.WriteTo.Debug()
.CreateLogger()
)
);

builder.Services
Expand Down
6 changes: 3 additions & 3 deletions examples/Serilog/Service/Service.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

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

<ItemGroup>
<PackageReference Include="Correlate.AspNetCore" Version="4.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.4.0" />
<PackageReference Include="Correlate.AspNetCore" Version="5.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
</ItemGroup>


Expand Down
2 changes: 1 addition & 1 deletion src/Correlate.Abstractions/Correlate.Abstractions.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<RootNamespace>Correlate</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Correlate.AspNetCore/Correlate.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<RootNamespace>Correlate</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Correlate.Core/Correlate.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<RootNamespace>Correlate</RootNamespace>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<RootNamespace>Correlate</RootNamespace>
</PropertyGroup>
Expand All @@ -11,11 +11,6 @@
<Serilog_AspNetCore>8.0.0</Serilog_AspNetCore>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net7.0'">
<Microsoft_AspNetCore_Mvc_Testing>7.0.10</Microsoft_AspNetCore_Mvc_Testing>
<Serilog_AspNetCore>7.0.0</Serilog_AspNetCore>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net6.0'">
<Microsoft_AspNetCore_Mvc_Testing>6.0.21</Microsoft_AspNetCore_Mvc_Testing>
<Serilog_AspNetCore>6.1.0</Serilog_AspNetCore>
Expand Down
2 changes: 1 addition & 1 deletion test/Correlate.Benchmarks/Correlate.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsTestProject>false</IsTestProject>
Expand Down
5 changes: 1 addition & 4 deletions test/Correlate.Benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@ Intel Core i7-8700K CPU 3.70GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical
| Method | Job | Runtime | Arguments | NuGetReferences | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | Alloc Ratio |
|-------- |------- |--------- |------------------------ |--------------------------------------------------------------- |---------:|--------:|--------:|------:|--------:|-------:|----------:|------------:|
| ApiCall | v4.0.0 | .NET 6.0 | /p:CurrentVersion=false | Correlate.AspNetCore 4.0.0,Correlate.DependencyInjection 4.0.0 | 169.6 us | 1.53 us | 1.36 us | 1.04 | 0.01 | 0.4883 | 4.33 KB | 1.15 |
| ApiCall | v4.0.0 | .NET 7.0 | /p:CurrentVersion=false | Correlate.AspNetCore 4.0.0,Correlate.DependencyInjection 4.0.0 | 174.8 us | 1.96 us | 1.64 us | 1.07 | 0.01 | 0.4883 | 4.06 KB | 1.08 |
| ApiCall | v4.0.0 | .NET 8.0 | /p:CurrentVersion=false | Correlate.AspNetCore 4.0.0,Correlate.DependencyInjection 4.0.0 | 165.5 us | 2.35 us | 2.20 us | 1.02 | 0.02 | 0.4883 | 3.87 KB | 1.03 |
| ApiCall | v5.1.0 | .NET 6.0 | /p:CurrentVersion=false | Correlate.AspNetCore 5.1.0,Correlate.DependencyInjection 5.1.0 | 168.7 us | 2.30 us | 2.15 us | 1.03 | 0.01 | 0.4883 | 4.17 KB | 1.11 |
| ApiCall | v5.1.0 | .NET 7.0 | /p:CurrentVersion=false | Correlate.AspNetCore 5.1.0,Correlate.DependencyInjection 5.1.0 | 169.9 us | 0.78 us | 0.65 us | 1.04 | 0.01 | 0.4883 | 3.91 KB | 1.04 |
| ApiCall | v5.1.0 | .NET 8.0 | /p:CurrentVersion=false | Correlate.AspNetCore 5.1.0,Correlate.DependencyInjection 5.1.0 | 162.6 us | 2.31 us | 2.05 us | 0.99 | 0.01 | 0.4883 | 3.75 KB | 1.00 |
| ApiCall | vNext | .NET 6.0 | Default | Default | 166.2 us | 1.70 us | 1.50 us | 1.02 | 0.02 | 0.4883 | 4.17 KB | 1.11 |
| ApiCall | vNext | .NET 7.0 | Default | Default | 170.6 us | 1.15 us | 1.02 us | 1.05 | 0.01 | 0.4883 | 3.91 KB | 1.04 |
| ApiCall | vNext | .NET 8.0 | Default | Default | 163.2 us | 1.60 us | 1.34 us | 1.00 | 0.00 | 0.4883 | 3.75 KB | 1.00 |

### CLI

To run the benchmark:
```
cd ./test/Correlate.Benchmarks
dotnet run -c Release -f net8.0 --runtimes net80 net70 net60
dotnet run -c Release -f net8.0 --runtimes net80 net60
```
2 changes: 1 addition & 1 deletion test/Correlate.Core.Tests/Correlate.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<RootNamespace>Correlate</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<RootNamespace>Correlate.DependencyInjection</RootNamespace>
</PropertyGroup>
Expand Down
6 changes: 1 addition & 5 deletions test/Correlate.Testing/Correlate.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.1</TargetFrameworks>
<IsTestProject>false</IsTestProject>
</PropertyGroup>

<PropertyGroup>
<Serilog_Extensions_Logging>8.0.0</Serilog_Extensions_Logging>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net7.0'">
<Serilog_Extensions_Logging>7.0.0</Serilog_Extensions_Logging>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net6.0'">
<Serilog_Extensions_Logging>3.1.0</Serilog_Extensions_Logging>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/Correlate.Testing/TestLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public bool IsEnabled(LogLevel logLevel)
return _isEnabled;
}

#if NET7_0_OR_GREATER
#if NET8_0_OR_GREATER
public IDisposable BeginScope<TState>(TState state)
where TState : notnull
#else
Expand Down
Loading