Skip to content

Commit dd9cfac

Browse files
authored
feat: Add NET8 to major packages (#2852)
1 parent 0d643ff commit dd9cfac

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<OutputType>Exe</OutputType>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7-
<TargetFramework>net8.0</TargetFramework>
8-
<PublishAot>true</PublishAot>
7+
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
8+
<PublishAot Condition="$(TargetFramework.StartsWith('net8'))">true</PublishAot>
99
</PropertyGroup>
1010

1111
<PropertyGroup>

src/Sentry.AspNetCore/Sentry.AspNetCore.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;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
55
<PackageTags>$(PackageTags);AspNetCore;MVC</PackageTags>
66
<Description>Official ASP.NET Core integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
77
</PropertyGroup>

src/Sentry.AspNetCore/SentryTunnelMiddleware.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ public async Task InvokeAsync(HttpContext context, RequestDelegate next)
2929
var request = context.Request;
3030
if (request.Method == "OPTIONS")
3131
{
32-
headers.Add("Access-Control-Allow-Origin", new[] { (string)request.Headers["Origin"]! });
33-
headers.Add("Access-Control-Allow-Headers", new[] { "Origin, X-Requested-With, Content-Type, Accept" });
34-
headers.Add("Access-Control-Allow-Methods", new[] { "POST, OPTIONS" });
35-
headers.Add("Access-Control-Allow-Credentials", new[] { "true" });
32+
if (request.Headers.TryGetValue("Origin", out var origin) && !string.IsNullOrEmpty(origin))
33+
{
34+
headers.Append("Access-Control-Allow-Origin", (string)origin!);
35+
}
36+
37+
headers.Append("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
38+
headers.Append("Access-Control-Allow-Methods", "POST, OPTIONS");
39+
headers.Append("Access-Control-Allow-Credentials", "true");
3640
response.StatusCode = 200;
3741
return;
3842
}

src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.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;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
55
<PackageTags>$(PackageTags);Azure;Functions;Worker</PackageTags>
66
<Description>Official Azure Functions Worker SDK integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
77
</PropertyGroup>

src/Sentry.NLog/Sentry.NLog.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;netstandard2.0;net462</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
55
<PackageTags>$(PackageTags);Logging;NLog</PackageTags>
66
<Description>Official NLog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
77
<CLSCompliant>true</CLSCompliant>

src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>Official OpenTelemetry integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
55
<PackageTags>$(PackageTags);OpenTelemetry</PackageTags>
6-
<TargetFrameworks>net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
6+
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
77
<ImplicitUsings>enable</ImplicitUsings>
88
</PropertyGroup>
99

src/Sentry.Serilog/Sentry.Serilog.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;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
55
<PackageTags>$(PackageTags);Logging;Serilog</PackageTags>
66
<Description>Official Serilog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
77
<CLSCompliant>true</CLSCompliant>

0 commit comments

Comments
 (0)