diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml
index 79622656db..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.203
+ 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 67fdc8d632..0d947082d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,9 @@
### Dependencies
+- 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))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#090)
- [diff](https://github.com/getsentry/sentry-native/compare/0.8.5...0.9.0)
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/global.json b/global.json
index 124659abd6..54b78446d6 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,7 @@
{
"sdk": {
- "version": "9.0.203",
- "workloadVersion": "9.0.203",
+ "version": "9.0.301",
+ "workloadVersion": "9.0.301",
"rollForward": "disable",
"allowPrerelease": false
}
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/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 @@
-
-
-
-
+
+
+
+
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..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
@@ -51,8 +53,8 @@
-
-
+
+
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.Maui.Tests/Mocks/MockApplication.cs b/test/Sentry.Maui.Tests/Mocks/MockApplication.cs
index e67d2405d7..87a42f4e44 100644
--- a/test/Sentry.Maui.Tests/Mocks/MockApplication.cs
+++ b/test/Sentry.Maui.Tests/Mocks/MockApplication.cs
@@ -1,3 +1,6 @@
+#if __IOS__
+using Foundation;
+#endif
using Microsoft.Maui.Controls.Internals;
namespace Sentry.Maui.Tests.Mocks;
@@ -39,11 +42,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;
}
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.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