From b2cb9ae841be52eea72184d623ae494ca54ee6c3 Mon Sep 17 00:00:00 2001
From: Casper Verhaar <casper.verhaar@gmail.com>
Date: Thu, 5 Jun 2025 17:32:10 +0200
Subject: [PATCH 01/16] 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 <jamescrosswell@users.noreply.github.com>
Date: Fri, 6 Jun 2025 17:35:54 +1200
Subject: [PATCH 02/16] 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 <jamescrosswell@users.noreply.github.com>
Date: Fri, 6 Jun 2025 17:36:04 +1200
Subject: [PATCH 03/16] 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 @@
   </ItemGroup>
 
   <!-- Dependencies for AndroidMavenLibrary references
-       Note: versions match what was shipped with net9.0-android35.0 in:
-       https://www.nuget.org/packages/Microsoft.Maui.Core/9.0.0#dependencies-body-tab
+       Matching what was shipped in the 9.0.300 workloads to avoid NU1608 warnings
        -->
   <ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
-    <PackageReference Include="Xamarin.AndroidX.Lifecycle.Process" Version="2.8.5.1" />
-    <PackageReference Include="Xamarin.AndroidX.Lifecycle.Common.Java8" Version="2.8.5.1" />
-    <!-- MAUI 9 references this version indirectly via Xamarin.AndroidX.SwipeRefreshLayout (>= 1.1.0.24)   -->
-    <PackageReference Include="Xamarin.AndroidX.Core" Version="1.13.1.5" />
+    <PackageReference Include="Xamarin.AndroidX.Lifecycle.Process" Version="2.8.7.2" />
+    <PackageReference Include="Xamarin.AndroidX.Lifecycle.Common.Java8" Version="2.8.7.2" />
+    <!-- MAUI 9 references this version indirectly via Xamarin.AndroidX.SwipeRefreshLayout   -->
+    <PackageReference Include="Xamarin.AndroidX.Core" Version="1.15.0.2" />
     <!-- We need 1.9.24 but there's no NuGet package for that version... the lowest version we can use is 2.0.0 -->
     <PackageReference Include="Xamarin.Kotlin.StdLib.Jdk8" Version="2.0.0" />
   </ItemGroup>

From 673baaf962119b44ffc829bfa9073ee12779fc8e Mon Sep 17 00:00:00 2001
From: James Crosswell <jamescrosswell@users.noreply.github.com>
Date: Fri, 6 Jun 2025 17:46:52 +1200
Subject: [PATCH 04/16] 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 <casper.verhaar@gmail.com>
Date: Fri, 6 Jun 2025 08:29:45 +0200
Subject: [PATCH 05/16] 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 <jamescrosswell@users.noreply.github.com>
Date: Tue, 10 Jun 2025 14:09:16 +1200
Subject: [PATCH 06/16] 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 @@
 
     <PackageReference Include="NSubstitute" Version="5.3.0" />
     <PackageReference Include="FluentAssertions" Version="6.12.0" />
-    <PackageReference Include="xunit" Version="2.9.2" />
-    <PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
+    <PackageReference Include="xunit" Version="2.9.3" />
+    <PackageReference Include="Xunit.SkippableFact" Version="1.5.23" />
     <PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
     <PackageReference Include="TestableIO.System.IO.Abstractions.TestingHelpers" Version="20.0.4" />
   </ItemGroup>
 
   <!-- only non-platform-specific projects should include these packages -->
   <ItemGroup Condition="'$(TargetPlatformIdentifier)'==''">
-    <PackageReference Include="Verify.Xunit" Version="28.5.0" />
-    <PackageReference Include="Verify.DiffPlex" Version="2.3.0" />
+    <PackageReference Include="Verify.Xunit" Version="30.3.1" />
+    <PackageReference Include="Verify.DiffPlex" Version="3.1.2" />
     <PackageReference Include="PublicApiGenerator" Version="11.1.0" />
-    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="All" />
+    <PackageReference Include="xunit.runner.visualstudio" Version="3.1.1" PrivateAssets="All" />
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
     <PackageReference Include="coverlet.collector" Version="6.0.0" />
   </ItemGroup>
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 @@
   <ItemGroup Condition="$(TargetFramework) == 'net9.0'">
     <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
     <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="9.0.0" />
-    <PackageReference Include="Verify.AspNetCore" Version="4.0.0" />
-    <PackageReference Include="Verify.Http" Version="6.4.1" />
+    <PackageReference Include="Verify.AspNetCore" Version="4.2.0" />
+    <PackageReference Include="Verify.Http" Version="6.5.0" />
   </ItemGroup>
 
   <ItemGroup>

From 613ebf24cb0f87c5da65536da91e957433cddf50 Mon Sep 17 00:00:00 2001
From: James Crosswell <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 11:15:41 +1200
Subject: [PATCH 07/16] 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 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>net462</TargetFramework>
+    <TargetFramework>net48</TargetFramework>
     <PackageTags>$(PackageTags);AspNet;MVC</PackageTags>
     <Description>Official ASP.NET integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
   </PropertyGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
+    <TargetFrameworks>netstandard2.1;netstandard2.0;net48</TargetFrameworks>
     <PackageTags>$(PackageTags);Logging;Microsoft.Extensions.Logging</PackageTags>
     <Description>
       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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net462;netstandard2.1</TargetFrameworks>
+    <TargetFrameworks>net48;netstandard2.1</TargetFrameworks>
     <Description>Official Entity Framework 6 integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
     <PackageTags>$(PackageTags);EntityFramework;EF;EF6</PackageTags>
   </PropertyGroup>
@@ -21,7 +21,7 @@
     <Using Include="Sentry.Integrations" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'net462'">
+  <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
     <PackageReference Include="EntityFramework" Version="6.2.0" />
   </ItemGroup>
 
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 @@
   <PropertyGroup>
     <Description>Official Hangfire integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
     <PackageTags>$(PackageTags);Hangfire</PackageTags>
-    <TargetFrameworks>net9.0;net8.0;net462</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <SignAssembly>false</SignAssembly>
   </PropertyGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;netstandard2.0;net462</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.0;net48</TargetFrameworks>
     <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>
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 @@
   <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>net9.0;net8.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net48</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
   </PropertyGroup>
 
@@ -20,6 +20,10 @@
     <PackageReference Include="OpenTelemetry" Version="1.6.0" />
   </ItemGroup>
 
+  <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
+    <PackageReference Include="System.Net.Http" Version="4.3.4" />
+  </ItemGroup>
+
   <ItemGroup>
     <InternalsVisibleTo Include="Sentry.OpenTelemetry.AspNetCore" PublicKey="$(SentryPublicKey)" />
     <InternalsVisibleTo Include="Sentry.OpenTelemetry.Tests" PublicKey="$(SentryPublicKey)" />
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net48</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>
@@ -27,11 +27,11 @@
     <Using Include="Serilog.Formatting" />
   </ItemGroup>
 
-  <ItemGroup Condition="$(TargetFramework) == 'net462' or $(TargetFramework) == 'netstandard2.0'">
+  <ItemGroup Condition="$(TargetFramework) == 'net48' or $(TargetFramework) == 'netstandard2.0'">
     <PackageReference Include="Serilog" Version="2.7.1" />
   </ItemGroup>
 
-  <ItemGroup Condition="$(TargetFramework) != 'net462' and $(TargetFramework) != 'netstandard2.0'">
+  <ItemGroup Condition="$(TargetFramework) != 'net48' and $(TargetFramework) != 'netstandard2.0'">
     <PackageReference Include="Serilog" Version="2.10.0" />
   </ItemGroup>
 
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;
 
 /// <summary>
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<byte> 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<byte> 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 @@
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
-    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net48</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net9.0-android35.0;net8.0-android34.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net9.0-ios18.0;net8.0-ios17.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net9.0-maccatalyst18.0;net8.0-maccatalyst17.0</TargetFrameworks>
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;
     /// </summary>
     public static SpanId Create()
     {
-#if NETSTANDARD2_0 || NET462
+#if NETSTANDARD2_0 || NET48X
         byte[] buf = new byte[8];
 #else
         Span<byte> 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 <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 11:57:33 +1200
Subject: [PATCH 08/16] 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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;netstandard2.0</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.0;net48</TargetFrameworks>
     <PackageTags>$(PackageTags);Logging;Microsoft.Extensions.Logging</PackageTags>
     <Description>Official Microsoft.Extensions.Logging integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
   </PropertyGroup>
@@ -15,6 +15,12 @@
     <ProjectReference Include="..\..\src\Sentry\Sentry.csproj" />
   </ItemGroup>
 
+  <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
+    <PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="2.1.0" />
+    <PackageReference Include="Microsoft.Extensions.Http" Version="2.1.0" />
+    <PackageReference Include="System.Net.Http" Version="4.3.4" />
+  </ItemGroup>
+
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
     <PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="2.1.0" />
     <PackageReference Include="Microsoft.Extensions.Http" Version="2.1.0" />

From f306014b35272d86c0df0d8350bec0bc8bb6fbdc Mon Sep 17 00:00:00 2001
From: James Crosswell <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 16:50:39 +1200
Subject: [PATCH 09/16] 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 <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 16:51:04 +1200
Subject: [PATCH 10/16] 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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;netstandard2.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.0</TargetFrameworks>
     <PackageTags>$(PackageTags);Logging;Microsoft.Extensions.Logging</PackageTags>
     <Description>Official Microsoft.Extensions.Logging integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
   </PropertyGroup>
@@ -15,12 +15,6 @@
     <ProjectReference Include="..\..\src\Sentry\Sentry.csproj" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
-    <PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="2.1.0" />
-    <PackageReference Include="Microsoft.Extensions.Http" Version="2.1.0" />
-    <PackageReference Include="System.Net.Http" Version="4.3.4" />
-  </ItemGroup>
-
   <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
     <PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="2.1.0" />
     <PackageReference Include="Microsoft.Extensions.Http" Version="2.1.0" />

From 88516fb44ef6932455cde2d5a8d8442b3869c921 Mon Sep 17 00:00:00 2001
From: James Crosswell <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 16:51:12 +1200
Subject: [PATCH 11/16] 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 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>net48</TargetFramework>
+    <TargetFramework>net462</TargetFramework>
     <PackageTags>$(PackageTags);AspNet;MVC</PackageTags>
     <Description>Official ASP.NET integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
   </PropertyGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.1;netstandard2.0;net48</TargetFrameworks>
+    <TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
     <PackageTags>$(PackageTags);Logging;Microsoft.Extensions.Logging</PackageTags>
     <Description>
       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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net48;netstandard2.1</TargetFrameworks>
+    <TargetFrameworks>net462;netstandard2.1</TargetFrameworks>
     <Description>Official Entity Framework 6 integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
     <PackageTags>$(PackageTags);EntityFramework;EF;EF6</PackageTags>
   </PropertyGroup>
@@ -21,7 +21,7 @@
     <Using Include="Sentry.Integrations" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
+  <ItemGroup Condition="'$(TargetFramework)' == 'net462'">
     <PackageReference Include="EntityFramework" Version="6.2.0" />
   </ItemGroup>
 
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 @@
   <PropertyGroup>
     <Description>Official Hangfire integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
     <PackageTags>$(PackageTags);Hangfire</PackageTags>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;net462</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
     <SignAssembly>false</SignAssembly>
   </PropertyGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;netstandard2.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.0;net462</TargetFrameworks>
     <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>
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 @@
   <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>net9.0;net8.0;netstandard2.1;netstandard2.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
     <ImplicitUsings>enable</ImplicitUsings>
   </PropertyGroup>
 
@@ -20,10 +20,6 @@
     <PackageReference Include="OpenTelemetry" Version="1.6.0" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'net48'">
-    <PackageReference Include="System.Net.Http" Version="4.3.4" />
-  </ItemGroup>
-
   <ItemGroup>
     <InternalsVisibleTo Include="Sentry.OpenTelemetry.AspNetCore" PublicKey="$(SentryPublicKey)" />
     <InternalsVisibleTo Include="Sentry.OpenTelemetry.Tests" PublicKey="$(SentryPublicKey)" />
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.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>
@@ -27,11 +27,11 @@
     <Using Include="Serilog.Formatting" />
   </ItemGroup>
 
-  <ItemGroup Condition="$(TargetFramework) == 'net48' or $(TargetFramework) == 'netstandard2.0'">
+  <ItemGroup Condition="$(TargetFramework) == 'net462' or $(TargetFramework) == 'netstandard2.0'">
     <PackageReference Include="Serilog" Version="2.7.1" />
   </ItemGroup>
 
-  <ItemGroup Condition="$(TargetFramework) != 'net48' and $(TargetFramework) != 'netstandard2.0'">
+  <ItemGroup Condition="$(TargetFramework) != 'net462' and $(TargetFramework) != 'netstandard2.0'">
     <PackageReference Include="Serilog" Version="2.10.0" />
   </ItemGroup>
 
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;
 
 /// <summary>
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<byte> 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<byte> 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 @@
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
-    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;netstandard2.1;netstandard2.0;net462</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net9.0-android35.0;net8.0-android34.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net9.0-ios18.0;net8.0-ios17.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net9.0-maccatalyst18.0;net8.0-maccatalyst17.0</TargetFrameworks>
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;
     /// </summary>
     public static SpanId Create()
     {
-#if NETSTANDARD2_0 || NET48X
+#if NETSTANDARD2_0 || NET462
         byte[] buf = new byte[8];
 #else
         Span<byte> 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 <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 17:13:00 +1200
Subject: [PATCH 12/16] 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 <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 17:17:21 +1200
Subject: [PATCH 13/16] 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 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
     <IsTestProject>false</IsTestProject>
   </PropertyGroup>
 
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 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
     <PropertyGroup>
-        <TargetFrameworks>net8.0;net48</TargetFrameworks>
+      <TargetFrameworks>net8.0</TargetFrameworks>
+      <!-- These tests fail on Mono -->
+      <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
     </PropertyGroup>
 
     <ItemGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <!-- Test EF Core 9 on .NET 9 -->
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <!-- Test EF Core 9 on .NET 9 -->
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 @@
 
   <PropertyGroup>
     <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
-  </PropertyGroup>
-
-  <!-- Running these tests on Mono fail -->
-  <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('windows'))">
-    <TargetFrameworks>$(TargetFrameworks);net48</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net8.0-android34.0;net9.0-android35.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>
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 @@
 
   <PropertyGroup>
     <!-- We use net8.0 to test netstandard2.0 -->
-    <TargetFrameworks>net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net8.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net8.0-android34.0;net9.0-android35.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0</TargetFrameworks>
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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net8.0-android34.0;net9.0-android35.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0</TargetFrameworks>
+    <!-- These tests fail on Mono -->
+    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>

From 2d6960869a5c59272461c6d0df22e276ed5ea978 Mon Sep 17 00:00:00 2001
From: James Crosswell <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 19:52:44 +1200
Subject: [PATCH 14/16] 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 @@
 ﻿<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net9.0;net8.0</TargetFrameworks>
-    <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net48</TargetFrameworks>
+    <TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net8.0-android34.0;net9.0-android35.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-ios17.0;net9.0-ios18.0</TargetFrameworks>
     <TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net8.0-maccatalyst17.0;net9.0-maccatalyst18.0</TargetFrameworks>

From dcde065341093daf17423a196a1724eb71d7c7f5 Mon Sep 17 00:00:00 2001
From: James Crosswell <jamescrosswell@users.noreply.github.com>
Date: Wed, 11 Jun 2025 20:39:11 +1200
Subject: [PATCH 15/16] Update CHANGELOG.md

---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5621303745..b4ce79f980 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,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))
+- Bump the version of the .NET SDK that we use from 9.0.203 to 9.0.300 ([#4272](https://github.com/getsentry/sentry-dotnet/pull/4272))
   - 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   
 - Bump Native SDK from v0.8.5 to v0.9.0 ([#4260](https://github.com/getsentry/sentry-dotnet/pull/4260))

From eae67c73cbf3499b227cfc72f300639a8b217a0a Mon Sep 17 00:00:00 2001
From: James Crosswell <jamescrosswell@users.noreply.github.com>
Date: Thu, 12 Jun 2025 16:11:43 +1200
Subject: [PATCH 16/16] Bump to 9.0.301

---
 .github/actions/environment/action.yml | 4 ++--
 CHANGELOG.md                           | 2 +-
 global.json                            | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml
index 8c9effea17..bdf5139596 100644
--- a/.github/actions/environment/action.yml
+++ b/.github/actions/environment/action.yml
@@ -67,14 +67,14 @@ runs:
       with:
         dotnet-version: |
           8.0.x
-          9.0.300
+          9.0.301
 
     - name: Install .NET Workloads
       shell: bash
       run: |
         pwd
         dotnet workload install \
-          wasm-tools wasm-tools-net8 maui-android \
+          wasm-tools wasm-tools-net8 maui-android android mobile-librarybuilder \
           ${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows macos' || '' }} \
           ${{ runner.os == 'Windows' && 'maui-ios maui-maccatalyst maui-windows' || '' }} \
           --temp-dir "${{ runner.temp }}" \
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b4ce79f980..0d947082d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@
 
 ### Dependencies
 
-- Bump the version of the .NET SDK that we use from 9.0.203 to 9.0.300 ([#4272](https://github.com/getsentry/sentry-dotnet/pull/4272))
+- Bump the version of the .NET SDK that we use from 9.0.203 to 9.0.301 ([#4272](https://github.com/getsentry/sentry-dotnet/pull/4272))
   - 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   
 - Bump Native SDK from v0.8.5 to v0.9.0 ([#4260](https://github.com/getsentry/sentry-dotnet/pull/4260))
diff --git a/global.json b/global.json
index 8e8c0368fc..54b78446d6 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,7 @@
 {
   "sdk": {
-    "version": "9.0.300",
-    "workloadVersion": "9.0.300",
+    "version": "9.0.301",
+    "workloadVersion": "9.0.301",
     "rollForward": "disable",
     "allowPrerelease": false
   }
