From b2cb9ae841be52eea72184d623ae494ca54ee6c3 Mon Sep 17 00:00:00 2001 From: Casper Verhaar Date: Thu, 5 Jun 2025 17:32:10 +0200 Subject: [PATCH 01/14] Bump .NET SDK to 9.0.204 --- .github/actions/environment/action.yml | 2 +- global.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml index 79622656db..2d3acef0e7 100644 --- a/.github/actions/environment/action.yml +++ b/.github/actions/environment/action.yml @@ -67,7 +67,7 @@ runs: with: dotnet-version: | 8.0.x - 9.0.203 + 9.0.204 - name: Install .NET Workloads shell: bash diff --git a/global.json b/global.json index 124659abd6..fc0c347dd1 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "9.0.203", - "workloadVersion": "9.0.203", + "version": "9.0.204", + "workloadVersion": "9.0.204", "rollForward": "disable", "allowPrerelease": false } From a75a0643b112512ff8ae00bf6bb7d08c89ba221c Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 6 Jun 2025 17:35:54 +1200 Subject: [PATCH 02/14] Bumped to 9.0.300 --- .github/actions/environment/action.yml | 2 +- global.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml index 2d3acef0e7..8c9effea17 100644 --- a/.github/actions/environment/action.yml +++ b/.github/actions/environment/action.yml @@ -67,7 +67,7 @@ runs: with: dotnet-version: | 8.0.x - 9.0.204 + 9.0.300 - name: Install .NET Workloads shell: bash diff --git a/global.json b/global.json index fc0c347dd1..8e8c0368fc 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "9.0.204", - "workloadVersion": "9.0.204", + "version": "9.0.300", + "workloadVersion": "9.0.300", "rollForward": "disable", "allowPrerelease": false } From 758893667b3d2c82a55049e5844a04d7c0d6cca1 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 6 Jun 2025 17:36:04 +1200 Subject: [PATCH 03/14] Bumped Java dependencies --- .../Sentry.Bindings.Android.csproj | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj b/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj index d3cc4f44cc..b8dbd70ea6 100644 --- a/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj +++ b/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj @@ -43,14 +43,13 @@ - - - - + + + + From 673baaf962119b44ffc829bfa9073ee12779fc8e Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 6 Jun 2025 17:46:52 +1200 Subject: [PATCH 04/14] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c418f1ab..652e089ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Unreleased + +### Dependencies + +- Bump the version of the .NET SDK that we use from 9.0.203 to 9.0.300 ([#4259](https://github.com/getsentry/sentry-dotnet/pull/4259)) + - Note that this also required we bump various Java depdendencies (since version 9.0.300 of the Android workload requires newer versions of the these) + - See https://docs.sentry.io/platforms/dotnet/troubleshooting/#detected-package-version-outside-of-dependency-constraint if you see NU1605, NU1608 and/or NU1107 warnings after upgrading + ## 5.10.0 ### Features From 093b9c953ad4695043659df73b00b87b516e64c8 Mon Sep 17 00:00:00 2001 From: Casper Verhaar Date: Fri, 6 Jun 2025 08:29:45 +0200 Subject: [PATCH 05/14] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 652e089ca2..8eb22fb937 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### Dependencies - Bump the version of the .NET SDK that we use from 9.0.203 to 9.0.300 ([#4259](https://github.com/getsentry/sentry-dotnet/pull/4259)) - - Note that this also required we bump various Java depdendencies (since version 9.0.300 of the Android workload requires newer versions of the these) + - Note that this also required we bump various Java dependencies (since version 9.0.300 of the Android workload requires newer versions of the these) - See https://docs.sentry.io/platforms/dotnet/troubleshooting/#detected-package-version-outside-of-dependency-constraint if you see NU1605, NU1608 and/or NU1107 warnings after upgrading ## 5.10.0 From 557dc48c62f289e467db3d2609fe171ea48aa870 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 10 Jun 2025 14:09:16 +1200 Subject: [PATCH 06/14] Bump to latest versions of Xunit and Verify --- test/Directory.Build.props | 10 +++++----- .../Sentry.AspNetCore.TestUtils.csproj | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/Directory.Build.props b/test/Directory.Build.props index c42f5271ab..ce5c98570f 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -51,18 +51,18 @@ - - + + - - + + - + diff --git a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj index 696fb19b39..4677f93b85 100644 --- a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj +++ b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj @@ -51,8 +51,8 @@ - - + + From 613ebf24cb0f87c5da65536da91e957433cddf50 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 11:15:41 +1200 Subject: [PATCH 07/14] Bump framework targets from net462 to net48 --- src/Sentry.AspNet/Sentry.AspNet.csproj | 2 +- src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj | 2 +- src/Sentry.EntityFramework/Sentry.EntityFramework.csproj | 4 ++-- src/Sentry.Hangfire/Sentry.Hangfire.csproj | 2 +- src/Sentry.NLog/Sentry.NLog.csproj | 2 +- src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj | 6 +++++- src/Sentry.Serilog/Sentry.Serilog.csproj | 6 +++--- src/Sentry/HttpStatusCodeRange.cs | 2 ++ src/Sentry/Internal/RandomValuesFactory.cs | 2 +- src/Sentry/Internal/SynchronizedRandomValuesFactory.cs | 2 +- src/Sentry/Sentry.csproj | 2 +- src/Sentry/SpanId.cs | 4 ++-- 12 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/Sentry.AspNet/Sentry.AspNet.csproj b/src/Sentry.AspNet/Sentry.AspNet.csproj index 17e56584de..c022cf18be 100644 --- a/src/Sentry.AspNet/Sentry.AspNet.csproj +++ b/src/Sentry.AspNet/Sentry.AspNet.csproj @@ -1,7 +1,7 @@ - net462 + net48 $(PackageTags);AspNet;MVC Official ASP.NET integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. diff --git a/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj b/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj index 2bb043f837..1011638c86 100644 --- a/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj +++ b/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj @@ -1,7 +1,7 @@  - netstandard2.1;netstandard2.0;net462 + netstandard2.1;netstandard2.0;net48 $(PackageTags);Logging;Microsoft.Extensions.Logging Official Diagnostic.Listener integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. Note: This package is not needed when using Sentry with .NET Core 3 or higher. diff --git a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj index bd9096007f..85e97a950e 100644 --- a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj +++ b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj @@ -1,7 +1,7 @@  - net462;netstandard2.1 + net48;netstandard2.1 Official Entity Framework 6 integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);EntityFramework;EF;EF6 @@ -21,7 +21,7 @@ - + diff --git a/src/Sentry.Hangfire/Sentry.Hangfire.csproj b/src/Sentry.Hangfire/Sentry.Hangfire.csproj index 941dd8c94d..925cc4b44a 100644 --- a/src/Sentry.Hangfire/Sentry.Hangfire.csproj +++ b/src/Sentry.Hangfire/Sentry.Hangfire.csproj @@ -3,7 +3,7 @@ Official Hangfire integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);Hangfire - net9.0;net8.0;net462 + net9.0;net8.0;net48 enable false diff --git a/src/Sentry.NLog/Sentry.NLog.csproj b/src/Sentry.NLog/Sentry.NLog.csproj index ba6ea63332..664339ed9d 100644 --- a/src/Sentry.NLog/Sentry.NLog.csproj +++ b/src/Sentry.NLog/Sentry.NLog.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;netstandard2.0;net462 + net9.0;net8.0;netstandard2.0;net48 $(PackageTags);Logging;NLog Official NLog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. true diff --git a/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj b/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj index 66daebfda3..ad2587e616 100644 --- a/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj +++ b/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj @@ -3,7 +3,7 @@ Official OpenTelemetry integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);OpenTelemetry - net9.0;net8.0;netstandard2.1;netstandard2.0;net462 + net9.0;net8.0;netstandard2.1;netstandard2.0;net48 enable @@ -20,6 +20,10 @@ + + + + diff --git a/src/Sentry.Serilog/Sentry.Serilog.csproj b/src/Sentry.Serilog/Sentry.Serilog.csproj index eca849fcd6..799dfa2577 100644 --- a/src/Sentry.Serilog/Sentry.Serilog.csproj +++ b/src/Sentry.Serilog/Sentry.Serilog.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;netstandard2.1;netstandard2.0;net462 + net9.0;net8.0;netstandard2.1;netstandard2.0;net48 $(PackageTags);Logging;Serilog Official Serilog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. true @@ -27,11 +27,11 @@ - + - + diff --git a/src/Sentry/HttpStatusCodeRange.cs b/src/Sentry/HttpStatusCodeRange.cs index cecd95530a..48f48bf4e0 100644 --- a/src/Sentry/HttpStatusCodeRange.cs +++ b/src/Sentry/HttpStatusCodeRange.cs @@ -1,3 +1,5 @@ +using System; + namespace Sentry; /// diff --git a/src/Sentry/Internal/RandomValuesFactory.cs b/src/Sentry/Internal/RandomValuesFactory.cs index 4b14d198da..444f3cdba8 100644 --- a/src/Sentry/Internal/RandomValuesFactory.cs +++ b/src/Sentry/Internal/RandomValuesFactory.cs @@ -7,7 +7,7 @@ internal abstract class RandomValuesFactory public abstract double NextDouble(); public abstract void NextBytes(byte[] bytes); -#if !(NETSTANDARD2_0 || NET462) +#if !(NETSTANDARD2_0 || NET48X) public abstract void NextBytes(Span bytes); #endif diff --git a/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs b/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs index 62a76f04f8..653970b213 100644 --- a/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs +++ b/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs @@ -17,7 +17,7 @@ internal class SynchronizedRandomValuesFactory : RandomValuesFactory public override double NextDouble() => Random.NextDouble(); public override void NextBytes(byte[] bytes) => Random.NextBytes(bytes); -#if !(NETSTANDARD2_0 || NET462) +#if !(NETSTANDARD2_0 || NET48X) public override void NextBytes(Span bytes) => Random.NextBytes(bytes); #endif diff --git a/src/Sentry/Sentry.csproj b/src/Sentry/Sentry.csproj index f5d358f8bc..0ea02b4dc7 100644 --- a/src/Sentry/Sentry.csproj +++ b/src/Sentry/Sentry.csproj @@ -8,7 +8,7 @@ - net9.0;net8.0;netstandard2.1;netstandard2.0;net462 + net9.0;net8.0;netstandard2.1;netstandard2.0;net48 $(TargetFrameworks);net9.0-android35.0;net8.0-android34.0 $(TargetFrameworks);net9.0-ios18.0;net8.0-ios17.0 $(TargetFrameworks);net9.0-maccatalyst18.0;net8.0-maccatalyst17.0 diff --git a/src/Sentry/SpanId.cs b/src/Sentry/SpanId.cs index 0548d75d53..a8d29060c4 100644 --- a/src/Sentry/SpanId.cs +++ b/src/Sentry/SpanId.cs @@ -48,7 +48,7 @@ namespace Sentry; /// public static SpanId Create() { -#if NETSTANDARD2_0 || NET462 +#if NETSTANDARD2_0 || NET48X byte[] buf = new byte[8]; #else Span buf = stackalloc byte[8]; @@ -57,7 +57,7 @@ public static SpanId Create() Random.NextBytes(buf); var random = BitConverter.ToInt64(buf -#if NETSTANDARD2_0 || NET462 +#if NETSTANDARD2_0 || NET48X , 0); #else ); From 2d07296478a799ad9db0d6885e7418a6f67a835a Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 11:57:33 +1200 Subject: [PATCH 08/14] Added net48 target to Sentry.Extension.Logging --- .../Sentry.Extensions.Logging.csproj | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj index e011099d02..e9a3d91a97 100644 --- a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj +++ b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;netstandard2.0 + net9.0;net8.0;netstandard2.0;net48 $(PackageTags);Logging;Microsoft.Extensions.Logging Official Microsoft.Extensions.Logging integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. @@ -15,6 +15,12 @@ + + + + + + From f306014b35272d86c0df0d8350bec0bc8bb6fbdc Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 16:50:39 +1200 Subject: [PATCH 09/14] Ensure MockApplication is created on the main thread on iOS --- test/Sentry.Maui.Tests/Mocks/MockApplication.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/Sentry.Maui.Tests/Mocks/MockApplication.cs b/test/Sentry.Maui.Tests/Mocks/MockApplication.cs index e67d2405d7..8015f8e13a 100644 --- a/test/Sentry.Maui.Tests/Mocks/MockApplication.cs +++ b/test/Sentry.Maui.Tests/Mocks/MockApplication.cs @@ -1,3 +1,4 @@ +using Foundation; using Microsoft.Maui.Controls.Internals; namespace Sentry.Maui.Tests.Mocks; @@ -39,11 +40,19 @@ protected override Window CreateWindow(IActivationState activationState) public static MockApplication Create() { // The base constructor will try to set the mock as the current application, which we don't want in tests. - lock (LockObj) { var previous = Current; - var application = new MockApplication(); + MockApplication application = null; +#if __IOS__ + // Ensure the constructor is called on the main thread + if (!NSThread.IsMain) + { + NSRunLoop.Main.InvokeOnMainThread(() => application = new MockApplication()); + } +#else + application = new MockApplication(); +#endif Current = previous; return application; } From 28ffb069bd58583095a4d24d3866c430f2bc9974 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 16:51:04 +1200 Subject: [PATCH 10/14] Revert "Added net48 target to Sentry.Extension.Logging" This reverts commit 2d07296478a799ad9db0d6885e7418a6f67a835a. --- .../Sentry.Extensions.Logging.csproj | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj index e9a3d91a97..e011099d02 100644 --- a/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj +++ b/src/Sentry.Extensions.Logging/Sentry.Extensions.Logging.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;netstandard2.0;net48 + net9.0;net8.0;netstandard2.0 $(PackageTags);Logging;Microsoft.Extensions.Logging Official Microsoft.Extensions.Logging integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. @@ -15,12 +15,6 @@ - - - - - - From 88516fb44ef6932455cde2d5a8d8442b3869c921 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 16:51:12 +1200 Subject: [PATCH 11/14] Revert "Bump framework targets from net462 to net48" This reverts commit 613ebf24cb0f87c5da65536da91e957433cddf50. --- src/Sentry.AspNet/Sentry.AspNet.csproj | 2 +- src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj | 2 +- src/Sentry.EntityFramework/Sentry.EntityFramework.csproj | 4 ++-- src/Sentry.Hangfire/Sentry.Hangfire.csproj | 2 +- src/Sentry.NLog/Sentry.NLog.csproj | 2 +- src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj | 6 +----- src/Sentry.Serilog/Sentry.Serilog.csproj | 6 +++--- src/Sentry/HttpStatusCodeRange.cs | 2 -- src/Sentry/Internal/RandomValuesFactory.cs | 2 +- src/Sentry/Internal/SynchronizedRandomValuesFactory.cs | 2 +- src/Sentry/Sentry.csproj | 2 +- src/Sentry/SpanId.cs | 4 ++-- 12 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/Sentry.AspNet/Sentry.AspNet.csproj b/src/Sentry.AspNet/Sentry.AspNet.csproj index c022cf18be..17e56584de 100644 --- a/src/Sentry.AspNet/Sentry.AspNet.csproj +++ b/src/Sentry.AspNet/Sentry.AspNet.csproj @@ -1,7 +1,7 @@ - net48 + net462 $(PackageTags);AspNet;MVC Official ASP.NET integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. diff --git a/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj b/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj index 1011638c86..2bb043f837 100644 --- a/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj +++ b/src/Sentry.DiagnosticSource/Sentry.DiagnosticSource.csproj @@ -1,7 +1,7 @@  - netstandard2.1;netstandard2.0;net48 + netstandard2.1;netstandard2.0;net462 $(PackageTags);Logging;Microsoft.Extensions.Logging Official Diagnostic.Listener integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. Note: This package is not needed when using Sentry with .NET Core 3 or higher. diff --git a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj index 85e97a950e..bd9096007f 100644 --- a/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj +++ b/src/Sentry.EntityFramework/Sentry.EntityFramework.csproj @@ -1,7 +1,7 @@  - net48;netstandard2.1 + net462;netstandard2.1 Official Entity Framework 6 integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);EntityFramework;EF;EF6 @@ -21,7 +21,7 @@ - + diff --git a/src/Sentry.Hangfire/Sentry.Hangfire.csproj b/src/Sentry.Hangfire/Sentry.Hangfire.csproj index 925cc4b44a..941dd8c94d 100644 --- a/src/Sentry.Hangfire/Sentry.Hangfire.csproj +++ b/src/Sentry.Hangfire/Sentry.Hangfire.csproj @@ -3,7 +3,7 @@ Official Hangfire integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);Hangfire - net9.0;net8.0;net48 + net9.0;net8.0;net462 enable false diff --git a/src/Sentry.NLog/Sentry.NLog.csproj b/src/Sentry.NLog/Sentry.NLog.csproj index 664339ed9d..ba6ea63332 100644 --- a/src/Sentry.NLog/Sentry.NLog.csproj +++ b/src/Sentry.NLog/Sentry.NLog.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;netstandard2.0;net48 + net9.0;net8.0;netstandard2.0;net462 $(PackageTags);Logging;NLog Official NLog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. true diff --git a/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj b/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj index ad2587e616..66daebfda3 100644 --- a/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj +++ b/src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj @@ -3,7 +3,7 @@ Official OpenTelemetry integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. $(PackageTags);OpenTelemetry - net9.0;net8.0;netstandard2.1;netstandard2.0;net48 + net9.0;net8.0;netstandard2.1;netstandard2.0;net462 enable @@ -20,10 +20,6 @@ - - - - diff --git a/src/Sentry.Serilog/Sentry.Serilog.csproj b/src/Sentry.Serilog/Sentry.Serilog.csproj index 799dfa2577..eca849fcd6 100644 --- a/src/Sentry.Serilog/Sentry.Serilog.csproj +++ b/src/Sentry.Serilog/Sentry.Serilog.csproj @@ -1,7 +1,7 @@  - net9.0;net8.0;netstandard2.1;netstandard2.0;net48 + net9.0;net8.0;netstandard2.1;netstandard2.0;net462 $(PackageTags);Logging;Serilog Official Serilog integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time. true @@ -27,11 +27,11 @@ - + - + diff --git a/src/Sentry/HttpStatusCodeRange.cs b/src/Sentry/HttpStatusCodeRange.cs index 48f48bf4e0..cecd95530a 100644 --- a/src/Sentry/HttpStatusCodeRange.cs +++ b/src/Sentry/HttpStatusCodeRange.cs @@ -1,5 +1,3 @@ -using System; - namespace Sentry; /// diff --git a/src/Sentry/Internal/RandomValuesFactory.cs b/src/Sentry/Internal/RandomValuesFactory.cs index 444f3cdba8..4b14d198da 100644 --- a/src/Sentry/Internal/RandomValuesFactory.cs +++ b/src/Sentry/Internal/RandomValuesFactory.cs @@ -7,7 +7,7 @@ internal abstract class RandomValuesFactory public abstract double NextDouble(); public abstract void NextBytes(byte[] bytes); -#if !(NETSTANDARD2_0 || NET48X) +#if !(NETSTANDARD2_0 || NET462) public abstract void NextBytes(Span bytes); #endif diff --git a/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs b/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs index 653970b213..62a76f04f8 100644 --- a/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs +++ b/src/Sentry/Internal/SynchronizedRandomValuesFactory.cs @@ -17,7 +17,7 @@ internal class SynchronizedRandomValuesFactory : RandomValuesFactory public override double NextDouble() => Random.NextDouble(); public override void NextBytes(byte[] bytes) => Random.NextBytes(bytes); -#if !(NETSTANDARD2_0 || NET48X) +#if !(NETSTANDARD2_0 || NET462) public override void NextBytes(Span bytes) => Random.NextBytes(bytes); #endif diff --git a/src/Sentry/Sentry.csproj b/src/Sentry/Sentry.csproj index 0ea02b4dc7..f5d358f8bc 100644 --- a/src/Sentry/Sentry.csproj +++ b/src/Sentry/Sentry.csproj @@ -8,7 +8,7 @@ - net9.0;net8.0;netstandard2.1;netstandard2.0;net48 + net9.0;net8.0;netstandard2.1;netstandard2.0;net462 $(TargetFrameworks);net9.0-android35.0;net8.0-android34.0 $(TargetFrameworks);net9.0-ios18.0;net8.0-ios17.0 $(TargetFrameworks);net9.0-maccatalyst18.0;net8.0-maccatalyst17.0 diff --git a/src/Sentry/SpanId.cs b/src/Sentry/SpanId.cs index a8d29060c4..0548d75d53 100644 --- a/src/Sentry/SpanId.cs +++ b/src/Sentry/SpanId.cs @@ -48,7 +48,7 @@ namespace Sentry; /// public static SpanId Create() { -#if NETSTANDARD2_0 || NET48X +#if NETSTANDARD2_0 || NET462 byte[] buf = new byte[8]; #else Span buf = stackalloc byte[8]; @@ -57,7 +57,7 @@ public static SpanId Create() Random.NextBytes(buf); var random = BitConverter.ToInt64(buf -#if NETSTANDARD2_0 || NET48X +#if NETSTANDARD2_0 || NET462 , 0); #else ); From 40da347ead69040b402e04f74a2cf391b9f70c95 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 17:13:00 +1200 Subject: [PATCH 12/14] Update MockApplication.cs --- test/Sentry.Maui.Tests/Mocks/MockApplication.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Sentry.Maui.Tests/Mocks/MockApplication.cs b/test/Sentry.Maui.Tests/Mocks/MockApplication.cs index 8015f8e13a..87a42f4e44 100644 --- a/test/Sentry.Maui.Tests/Mocks/MockApplication.cs +++ b/test/Sentry.Maui.Tests/Mocks/MockApplication.cs @@ -1,4 +1,6 @@ +#if __IOS__ using Foundation; +#endif using Microsoft.Maui.Controls.Internals; namespace Sentry.Maui.Tests.Mocks; From fee498d9e92115135b1e278f652107a583b52d03 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 17:17:21 +1200 Subject: [PATCH 13/14] Only run .NET Framework tests on Windows --- Sentry-CI-Build-Linux-arm64.slnf | 1 - Sentry-CI-Build-Linux-musl.slnf | 1 - Sentry-CI-Build-Linux.slnf | 1 - Sentry-CI-Build-macOS.slnf | 1 - scripts/generate-solution-filters-config.yaml | 2 ++ .../Sentry.AspNetCore.TestUtils.csproj | 4 +++- .../Sentry.Azure.Functions.Worker.Tests.csproj | 4 +++- .../Sentry.DiagnosticSource.IntegrationTests.csproj | 4 +++- .../Sentry.DiagnosticSource.Tests.csproj | 4 +++- .../Sentry.EntityFramework.Tests.csproj | 7 ++----- .../Sentry.Extensions.Logging.Tests.csproj | 4 +++- test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj | 4 +++- test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj | 4 +++- .../Sentry.OpenTelemetry.Tests.csproj | 4 +++- test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj | 4 +++- test/Sentry.Testing/Sentry.Testing.csproj | 3 ++- test/Sentry.Tests/Sentry.Tests.csproj | 4 +++- 17 files changed, 36 insertions(+), 20 deletions(-) diff --git a/Sentry-CI-Build-Linux-arm64.slnf b/Sentry-CI-Build-Linux-arm64.slnf index 9d305e5df8..485f9e14a5 100644 --- a/Sentry-CI-Build-Linux-arm64.slnf +++ b/Sentry-CI-Build-Linux-arm64.slnf @@ -47,7 +47,6 @@ "src\\Sentry.SourceGenerators\\Sentry.SourceGenerators.csproj", "src\\Sentry\\Sentry.csproj", "test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj", - "test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj", "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", diff --git a/Sentry-CI-Build-Linux-musl.slnf b/Sentry-CI-Build-Linux-musl.slnf index 9d305e5df8..485f9e14a5 100644 --- a/Sentry-CI-Build-Linux-musl.slnf +++ b/Sentry-CI-Build-Linux-musl.slnf @@ -47,7 +47,6 @@ "src\\Sentry.SourceGenerators\\Sentry.SourceGenerators.csproj", "src\\Sentry\\Sentry.csproj", "test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj", - "test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj", "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", diff --git a/Sentry-CI-Build-Linux.slnf b/Sentry-CI-Build-Linux.slnf index 8b3ca210c0..b31c819bc8 100644 --- a/Sentry-CI-Build-Linux.slnf +++ b/Sentry-CI-Build-Linux.slnf @@ -54,7 +54,6 @@ "src\\Sentry\\Sentry.csproj", "test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj", "test\\Sentry.Android.AssemblyReader.Tests\\Sentry.Android.AssemblyReader.Tests.csproj", - "test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj", "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", diff --git a/Sentry-CI-Build-macOS.slnf b/Sentry-CI-Build-macOS.slnf index e654c81e63..778a9a13db 100644 --- a/Sentry-CI-Build-macOS.slnf +++ b/Sentry-CI-Build-macOS.slnf @@ -61,7 +61,6 @@ "src\\Sentry\\Sentry.csproj", "test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj", "test\\Sentry.Android.AssemblyReader.Tests\\Sentry.Android.AssemblyReader.Tests.csproj", - "test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj", "test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj", "test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj", "test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj", diff --git a/scripts/generate-solution-filters-config.yaml b/scripts/generate-solution-filters-config.yaml index 8f54c4bb8d..1cfee815c1 100644 --- a/scripts/generate-solution-filters-config.yaml +++ b/scripts/generate-solution-filters-config.yaml @@ -24,6 +24,7 @@ groupConfigs: windowsOnly: # .NET Framework projects - "**/*.AspNet.csproj" + - "**/*.AspNet.Tests.csproj" artefacts: # Any projects in the obj or bin directories - "**/obj/**/*.csproj" @@ -93,6 +94,7 @@ filterConfigs: patterns: - "**/*AndroidTestApp.csproj" - "**/*DeviceTests*.csproj" + - "**/*.AspNet.Tests.csproj" - outputPath: Sentry-CI-Build-Windows.slnf include: diff --git a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj index 4677f93b85..c60ea32096 100644 --- a/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj +++ b/test/Sentry.AspNetCore.TestUtils/Sentry.AspNetCore.TestUtils.csproj @@ -1,7 +1,9 @@ - net9.0;net8.0;net48 + net9.0;net8.0 + + $(TargetFrameworks);net48 false diff --git a/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj b/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj index fa52c80252..eee27b2b21 100644 --- a/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj +++ b/test/Sentry.Azure.Functions.Worker.Tests/Sentry.Azure.Functions.Worker.Tests.csproj @@ -1,7 +1,9 @@ - net8.0;net48 + net8.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj index f9bb661a84..504be0b959 100644 --- a/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj +++ b/test/Sentry.DiagnosticSource.IntegrationTests/Sentry.DiagnosticSource.IntegrationTests.csproj @@ -1,7 +1,9 @@  - net9.0;net8.0;net48 + net9.0;net8.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj index 89516e5ebb..cf4e670998 100644 --- a/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj +++ b/test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj @@ -1,7 +1,9 @@  - net9.0;net8.0;net48 + net9.0;net8.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj b/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj index a4bca32985..d81324346b 100644 --- a/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj +++ b/test/Sentry.EntityFramework.Tests/Sentry.EntityFramework.Tests.csproj @@ -2,11 +2,8 @@ net9.0;net8.0 - - - - - $(TargetFrameworks);net48 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj index 7b0d03edad..27b9c73763 100644 --- a/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj +++ b/test/Sentry.Extensions.Logging.Tests/Sentry.Extensions.Logging.Tests.csproj @@ -1,10 +1,12 @@  - net9.0;net8.0;net48 + net9.0;net8.0 $(TargetFrameworks);net8.0-android34.0;net9.0-android35.0 $(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0 $(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj b/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj index b8d686aefd..9939555343 100644 --- a/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj +++ b/test/Sentry.Log4Net.Tests/Sentry.Log4Net.Tests.csproj @@ -2,7 +2,9 @@ - net8.0;net48 + net8.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj b/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj index 607b580e48..bc003e6461 100644 --- a/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj +++ b/test/Sentry.NLog.Tests/Sentry.NLog.Tests.csproj @@ -1,7 +1,9 @@  - net9.0;net8.0;net48 + net9.0;net8.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj b/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj index 4752071589..c5d402cc2e 100644 --- a/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj +++ b/test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj @@ -1,7 +1,9 @@  - net9.0;net8.0;net48 + net9.0;net8.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj b/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj index 3929da11fd..5bf555ed06 100644 --- a/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj +++ b/test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj @@ -1,7 +1,9 @@  - net9.0;net8.0;net48 + net9.0;net8.0 + + $(TargetFrameworks);net48 diff --git a/test/Sentry.Testing/Sentry.Testing.csproj b/test/Sentry.Testing/Sentry.Testing.csproj index 8fbe7f01f1..31096026d9 100644 --- a/test/Sentry.Testing/Sentry.Testing.csproj +++ b/test/Sentry.Testing/Sentry.Testing.csproj @@ -1,7 +1,8 @@  - net9.0;net8.0;net48 + net9.0;net8.0 + $(TargetFrameworks);net48 $(TargetFrameworks);net8.0-android34.0;net9.0-android35.0 $(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0 $(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0 diff --git a/test/Sentry.Tests/Sentry.Tests.csproj b/test/Sentry.Tests/Sentry.Tests.csproj index d2e0edd2a5..3f00bc5a9f 100644 --- a/test/Sentry.Tests/Sentry.Tests.csproj +++ b/test/Sentry.Tests/Sentry.Tests.csproj @@ -1,10 +1,12 @@  - net9.0;net8.0;net48 + net9.0;net8.0 $(TargetFrameworks);net8.0-android34.0;net9.0-android35.0 $(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0 $(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0 + + $(TargetFrameworks);net48 From 2d6960869a5c59272461c6d0df22e276ed5ea978 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 11 Jun 2025 19:52:44 +1200 Subject: [PATCH 14/14] Update Sentry.Testing.csproj --- test/Sentry.Testing/Sentry.Testing.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/Sentry.Testing/Sentry.Testing.csproj b/test/Sentry.Testing/Sentry.Testing.csproj index 31096026d9..8fbe7f01f1 100644 --- a/test/Sentry.Testing/Sentry.Testing.csproj +++ b/test/Sentry.Testing/Sentry.Testing.csproj @@ -1,8 +1,7 @@  - net9.0;net8.0 - $(TargetFrameworks);net48 + net9.0;net8.0;net48 $(TargetFrameworks);net8.0-android34.0;net9.0-android35.0 $(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0 $(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0