Skip to content

feat: Add NET8 to major packages #2852

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

Merged
merged 2 commits into from
Nov 16, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetFramework>net8.0</TargetFramework>
<PublishAot>true</PublishAot>
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<PublishAot Condition="$(TargetFramework.StartsWith('net8'))">true</PublishAot>
</PropertyGroup>

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

<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<PackageTags>$(PackageTags);AspNetCore;MVC</PackageTags>
<Description>Official ASP.NET Core integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
</PropertyGroup>
Expand Down
12 changes: 8 additions & 4 deletions src/Sentry.AspNetCore/SentryTunnelMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ public async Task InvokeAsync(HttpContext context, RequestDelegate next)
var request = context.Request;
if (request.Method == "OPTIONS")
{
headers.Add("Access-Control-Allow-Origin", new[] { (string)request.Headers["Origin"]! });
headers.Add("Access-Control-Allow-Headers", new[] { "Origin, X-Requested-With, Content-Type, Accept" });
headers.Add("Access-Control-Allow-Methods", new[] { "POST, OPTIONS" });
headers.Add("Access-Control-Allow-Credentials", new[] { "true" });
if (request.Headers.TryGetValue("Origin", out var origin) && !string.IsNullOrEmpty(origin))
{
headers.Append("Access-Control-Allow-Origin", (string)origin!);
}

headers.Append("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
headers.Append("Access-Control-Allow-Methods", "POST, OPTIONS");
headers.Append("Access-Control-Allow-Credentials", "true");
response.StatusCode = 200;
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<PackageTags>$(PackageTags);Azure;Functions;Worker</PackageTags>
<Description>Official Azure Functions Worker SDK integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry.NLog/Sentry.NLog.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping we would get rid of ns2.1 if we can, but avoid adding it to more libraries.
It's fair that the lib supports it and so does the Sentry core SDK. But the package is fairly lower in terms of usage: https://nugettrends.com/packages?months=72&ids=Sentry.NLog&ids=Sentry

And most people are updating their runtimes. .NET Standard 2.1 came to help bridge .NET Framework and .NET Core 3.1. We had .NET 5,6,7,8 now so hoping we can get rid of those netstandard

How about we remove this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<PackageTags>$(PackageTags);Logging;NLog</PackageTags>
<Description>Official NLog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
<CLSCompliant>true</CLSCompliant>
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>Official OpenTelemetry integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
<PackageTags>$(PackageTags);OpenTelemetry</PackageTags>
<TargetFrameworks>net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

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

<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<PackageTags>$(PackageTags);Logging;Serilog</PackageTags>
<Description>Official Serilog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
<CLSCompliant>true</CLSCompliant>
Expand Down