Skip to content

Commit 710f440

Browse files
committed
feat: add update versjon to .net 8
1 parent 368f887 commit 710f440

File tree

11 files changed

+40
-15
lines changed

11 files changed

+40
-15
lines changed

samples/MinimalApiSample/MinimalApiSample.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.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
namespace WebSample
1+
using Microsoft.AspNetCore.Http;
2+
using Serilog;
3+
using System.Threading.Tasks;
4+
5+
namespace WebSample
26
{
3-
internal class RequestValidationMiddleware
7+
internal class RequestValidationMiddleware : IMiddleware
48
{
9+
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
10+
{
11+
var path = context.Request.Path.Value.ToLower();
12+
13+
Log.Information("Path requested: {path}", path);
14+
15+
await next(context);
16+
}
517
}
618
}

samples/WebSample/Startup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public Startup(IConfiguration configuration)
1919
// This method gets called by the runtime. Use this method to add services to the container.
2020
public void ConfigureServices(IServiceCollection services)
2121
{
22+
services.AddSingleton<RequestValidationMiddleware>();
2223
services.AddControllersWithViews();
2324
}
2425

samples/WebSample/WebSample.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.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

samples/WorkerSample/WorkerSample.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk.Worker">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<UserSecretsId>dotnet-WorkerSample-E1FD34C8-B239-4D87-8143-0BA5129DDB52</UserSecretsId>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
9+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

src/Intility.Extensions.Logging.Dynatrace/Intility.Extensions.Logging.Dynatrace.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">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Intility.Extensions.Logging.Elasticsearch/Intility.Extensions.Logging.Elasticsearch.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">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Intility.Extensions.Logging.Sentry/Intility.Extensions.Logging.Sentry.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>net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -19,8 +19,8 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Sentry.AspNetCore" Version="3.40.1" />
23-
<PackageReference Include="Sentry.Serilog" Version="3.40.1" />
22+
<PackageReference Include="Sentry.AspNetCore" Version="3.41.0" />
23+
<PackageReference Include="Sentry.Serilog" Version="3.41.0" />
2424
</ItemGroup>
2525

2626
<ItemGroup>

src/Intility.Extensions.Logging/Intility.Extensions.Logging.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -20,7 +20,7 @@
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Serilog" Version="3.0.1" />
23+
<PackageReference Include="Serilog" Version="3.1.1" />
2424
</ItemGroup>
2525

2626
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
@@ -31,6 +31,10 @@
3131
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
3232
</ItemGroup>
3333

34+
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
35+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
36+
</ItemGroup>
37+
3438
<ItemGroup>
3539
<None Include="../../assets/intility-logo.png" Pack="true" Visible="false" PackagePath="\" />
3640
</ItemGroup>

src/Intility.Logging.AspNetCore/Intility.Logging.AspNetCore.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -24,7 +24,7 @@
2424
<PackageReference Include="Serilog.Enrichers.AssemblyName" Version="1.0.9" />
2525
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.3.0" />
2626
<PackageReference Include="Serilog.Enrichers.Memory" Version="1.0.4" />
27-
<PackageReference Include="Serilog.Enrichers.AzureClaims" Version="1.0.1" />
27+
<PackageReference Include="Serilog.Enrichers.AzureClaims" Version="1.0.2" />
2828
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.3" />
2929
</ItemGroup>
3030

@@ -39,6 +39,12 @@
3939
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
4040
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
4141
</ItemGroup>
42+
43+
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
44+
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
45+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
46+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
47+
</ItemGroup>
4248

4349
<ItemGroup>
4450
<ProjectReference Include="..\Intility.Extensions.Logging\Intility.Extensions.Logging.csproj" />

0 commit comments

Comments
 (0)