From 70147ec41b3a4c4efa064c3fc1b9501fab783d6a Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 12:53:22 +1300 Subject: [PATCH 01/21] Sentry.Samples.Android --- samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj b/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj index a9eacd63be..c7e2e59664 100644 --- a/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj +++ b/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj @@ -1,6 +1,6 @@ - net9.0-android35.0 + net10.0-android36.0 21 Exe enable From de0dd5f21d16cae489ec082e6895a219a2d0de5e Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 13:15:30 +1300 Subject: [PATCH 02/21] Sentry.Samples.GenericHost --- .../Sentry.Samples.GenericHost.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj b/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj index d2b5e11219..0f21c13afe 100644 --- a/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj +++ b/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 From 3e928ae4d0617a890486a8d21c8a952b2b1e3d3e Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 13:35:04 +1300 Subject: [PATCH 03/21] Sentry.Samples.Ios --- samples/Sentry.Samples.Ios/AppDelegate.cs | 4 +++- samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/samples/Sentry.Samples.Ios/AppDelegate.cs b/samples/Sentry.Samples.Ios/AppDelegate.cs index 37e2a48509..7166ac6080 100644 --- a/samples/Sentry.Samples.Ios/AppDelegate.cs +++ b/samples/Sentry.Samples.Ios/AppDelegate.cs @@ -11,7 +11,7 @@ public override UIWindow? Window set; } - public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) + public override bool FinishedLaunching(UIApplication application, NSDictionary? launchOptions) { // Init the Sentry SDK SentrySdk.Init(options => @@ -55,8 +55,10 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary l }; }); +#pragma warning disable CA1422 // Validate platform compatibility // create a new window instance based on the screen size Window = new UIWindow(UIScreen.MainScreen.Bounds); +#pragma warning restore CA1416 // determine control colours (SystemBackground requires iOS >= 13.0) var backgroundColor = UIDevice.CurrentDevice.CheckSystemVersion(13, 0) diff --git a/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj b/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj index 55ff9e06b4..cbccc23313 100644 --- a/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj +++ b/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj @@ -1,8 +1,8 @@ - net9.0-ios18.0 - 18 + net10.0-ios26.0 + 26 Exe enable true From d5f67daa7e2bb5d854ddd0b231126c5d80e300b9 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 13:46:10 +1300 Subject: [PATCH 04/21] Sentry.Samples.MacCatalyst Note that I can't test this (my Apple Developer account has expired)... hoping Stefan can help :-) --- samples/Sentry.Samples.MacCatalyst/AppDelegate.cs | 2 ++ .../Sentry.Samples.MacCatalyst.csproj | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs b/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs index 1be71dc6d4..c5f96144e6 100644 --- a/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs +++ b/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs @@ -29,8 +29,10 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary? options.Debug = true; }); +#pragma warning disable CA1422 // Validate platform compatibility // create a new window instance based on the screen size Window = new UIWindow(UIScreen.MainScreen.Bounds); +#pragma warning disable CA1422 // Validate platform compatibility // create a UIViewController with a single UILabel var vc = new UIViewController(); diff --git a/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj b/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj index 0ba0946ebf..e3e8fce704 100644 --- a/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj +++ b/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj @@ -1,7 +1,7 @@ - net9.0-maccatalyst18.0 + net10.0-maccatalyst26.0 Exe enable true From 9c66c764f7e4aafbd94b9aee8cceddba81dfa5cf Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 13:52:52 +1300 Subject: [PATCH 05/21] Sentry.Samples.MacOS --- samples/Sentry.Samples.MacOS/AppDelegate.cs | 3 +++ samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/Sentry.Samples.MacOS/AppDelegate.cs b/samples/Sentry.Samples.MacOS/AppDelegate.cs index 8aba349817..97c8ada26a 100644 --- a/samples/Sentry.Samples.MacOS/AppDelegate.cs +++ b/samples/Sentry.Samples.MacOS/AppDelegate.cs @@ -16,5 +16,8 @@ public override void DidFinishLaunching(NSNotification notification) options.Debug = true; options.TracesSampleRate = 1.0; }); + + // You can now capture messages and exceptions + SentrySdk.CaptureMessage("Hello from Sentry MacOS sample!"); } } diff --git a/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj b/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj index c2cced507d..a9b622720b 100644 --- a/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj +++ b/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj @@ -1,7 +1,7 @@ - net9.0-macos + net10.0-macos Exe enable true From 807bdf19fdf38b6778155a594ad3dcc704a2b341 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 16:10:43 +1300 Subject: [PATCH 06/21] Sentry.Samples.Maui --- samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj | 6 +++--- samples/Sentry.Samples.Maui/SubmitFeedback.xaml.cs | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj b/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj index c96c83d357..becfa438c3 100644 --- a/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj +++ b/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj @@ -6,9 +6,9 @@ On Mac, we'll also build for iOS and MacCatalyst. On Windows, we'll also build for Windows 10. --> - $(TargetFrameworks);net9.0-android - $(TargetFrameworks);net9.0-windows10.0.19041.0 - $(TargetFrameworks);net9.0-ios18.0;net9.0-maccatalyst18.0 + $(TargetFrameworks);net10.0-android + $(TargetFrameworks);net10.0-windows10.0.19041.0 + $(TargetFrameworks);net10.0-ios26.0;net10.0-maccatalyst26.0 Exe Sentry.Samples.Maui true diff --git a/samples/Sentry.Samples.Maui/SubmitFeedback.xaml.cs b/samples/Sentry.Samples.Maui/SubmitFeedback.xaml.cs index 84b5453d36..b8683eace4 100644 --- a/samples/Sentry.Samples.Maui/SubmitFeedback.xaml.cs +++ b/samples/Sentry.Samples.Maui/SubmitFeedback.xaml.cs @@ -29,13 +29,13 @@ private async void OnSubmitClicked(object sender, EventArgs e) if (string.IsNullOrWhiteSpace(message)) { - await DisplayAlert("Validation Error", "Message is required.", "OK"); + await DisplayAlertAsync("Validation Error", "Message is required.", "OK"); return; } if (!IsValidEmail(contactEmail)) { - await DisplayAlert("Validation Error", "Please enter a valid email address.", "OK"); + await DisplayAlertAsync("Validation Error", "Please enter a valid email address.", "OK"); return; } @@ -50,7 +50,7 @@ private async void OnSubmitClicked(object sender, EventArgs e) var feedback = new SentryFeedback(message, contactEmail, name); SentrySdk.CaptureFeedback(feedback, hint: hint); - await DisplayAlert("Feedback Submitted", "Thank you for your feedback!", "OK"); + await DisplayAlertAsync("Feedback Submitted", "Thank you for your feedback!", "OK"); await Navigation.PopModalAsync(); } @@ -72,12 +72,12 @@ private async void OnAttachScreenshotClicked(object sender, EventArgs e) if (result != null) { _screenshotPath = result.FullPath; - await DisplayAlert("Screenshot Attached", "Screenshot has been attached successfully.", "OK"); + await DisplayAlertAsync("Screenshot Attached", "Screenshot has been attached successfully.", "OK"); } } catch (Exception ex) { - await DisplayAlert("Error", $"An error occurred while selecting the screenshot: {ex.Message}", "OK"); + await DisplayAlertAsync("Error", $"An error occurred while selecting the screenshot: {ex.Message}", "OK"); } } } From 3271051e218676ead87141779528e287deb8ccbd Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 16:15:07 +1300 Subject: [PATCH 07/21] Sentry.Samples.ME.Logging --- .../Sentry.Samples.ME.Logging.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj b/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj index dfe4a8f252..7e3cbeb59d 100644 --- a/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj +++ b/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj @@ -2,11 +2,11 @@ Exe - net9.0 + net10.0 - + From 3f650f1b27e01a05b4cd4dad70feb283c95da4fc Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 2 Dec 2025 16:26:04 +1300 Subject: [PATCH 08/21] Sentry.Samples.OpenTelemetry.AzureFunctions --- .../Sentry.Samples.OpenTelemetry.AzureFunctions.csproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Sentry.Samples.OpenTelemetry.AzureFunctions.csproj b/samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Sentry.Samples.OpenTelemetry.AzureFunctions.csproj index 2e844d2068..adfc053aaa 100644 --- a/samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Sentry.Samples.OpenTelemetry.AzureFunctions.csproj +++ b/samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Sentry.Samples.OpenTelemetry.AzureFunctions.csproj @@ -1,15 +1,15 @@ - net9.0 + net10.0 v4 Exe - - - - + + + + From a9062c0c859c5cd9008f287e29ca7830a29aab03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20P=C3=B6lz?= <38893694+Flash0ver@users.noreply.github.com> Date: Tue, 2 Dec 2025 17:11:26 +0100 Subject: [PATCH 09/21] update WASM sample --- .../App.razor | 8 +- .../Pages/Catcher.razor | 2 +- .../Pages/NotFound.razor | 5 + .../Pages/Thrower.razor | 2 +- .../Program.cs | 2 + .../Properties/launchSettings.json | 3 +- ...ntry.Samples.AspNetCore.Blazor.Wasm.csproj | 9 +- .../Shared/MainLayout.razor | 8 +- .../_Imports.razor | 1 + .../wwwroot/app.css | 134 +++++++++++++++--- .../wwwroot/favicon.png | Bin 0 -> 1148 bytes .../wwwroot/index.html | 36 +++-- 12 files changed, 159 insertions(+), 51 deletions(-) create mode 100644 samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/NotFound.razor create mode 100644 samples/Sentry.Samples.AspNetCore.Blazor.Wasm/wwwroot/favicon.png diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/App.razor b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/App.razor index 6f67a6ea61..57757a2952 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/App.razor +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/App.razor @@ -1,10 +1,6 @@ - + + - - -

Sorry, there's nothing at this address.

-
-
diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Catcher.razor b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Catcher.razor index ee655def14..2c9711c18b 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Catcher.razor +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Catcher.razor @@ -29,6 +29,6 @@ private static class OtherStuffThrower { public static void DoSomething() => Thrower(); - private static void Thrower() => throw null; + private static void Thrower() => throw null!; } } diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/NotFound.razor b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/NotFound.razor new file mode 100644 index 0000000000..091b6b8bc5 --- /dev/null +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/NotFound.razor @@ -0,0 +1,5 @@ +@page "/not-found" +@layout MainLayout + +

Not Found

+

Sorry, the content you are looking for does not exist.

diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Thrower.razor b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Thrower.razor index a31da9150f..bcf18a6511 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Thrower.razor +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Pages/Thrower.razor @@ -30,6 +30,6 @@ private static class StuffThrower { public static void DoSomething() => Thrower(); - private static void Thrower() => throw null; + private static void Thrower() => throw null!; } } diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs index 77092780bd..b60cf3be18 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Program.cs @@ -1,3 +1,4 @@ +using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Sentry.Samples.AspNetCore.Blazor.Wasm; @@ -15,6 +16,7 @@ }); builder.RootComponents.Add("#app"); + builder.RootComponents.Add("head::after"); builder.Logging.SetMinimumLevel(LogLevel.Debug); builder.Services.AddScoped(_ => diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Properties/launchSettings.json b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Properties/launchSettings.json index 9d30e4b522..fcd43ff6d7 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Properties/launchSettings.json +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Properties/launchSettings.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/launchsettings.json", "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, @@ -18,7 +19,7 @@ }, "Sentry.Samples.AspNetCore.Blazor.Wasm": { "commandName": "Project", - "dotnetRunMessages": "true", + "dotnetRunMessages": true, "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", "applicationUrl": "https://localhost:5001;http://localhost:5000", diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj index 22d6f53b09..d9a2f3e123 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj @@ -1,7 +1,10 @@  - net9.0 + net10.0 + enable + enable + true true @@ -15,8 +18,8 @@
- - + +
diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Shared/MainLayout.razor b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Shared/MainLayout.razor index 1dc46026d8..89abb56df1 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Shared/MainLayout.razor +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Shared/MainLayout.razor @@ -5,7 +5,9 @@ -
- @Body -
+
+
+ @Body +
+
diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/_Imports.razor b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/_Imports.razor index 5ec42db600..6183979d81 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/_Imports.razor +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/_Imports.razor @@ -3,6 +3,7 @@ @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web +@using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop @using Sentry.Samples.AspNetCore.Blazor.Wasm diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/wwwroot/app.css b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/wwwroot/app.css index a0435feb7f..690ad2303b 100644 --- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/wwwroot/app.css +++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/wwwroot/app.css @@ -1,4 +1,7 @@ -/* styles all tags within