From 8aba26a45e770322b2a1b5399fff46048ac5a854 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 16:20:10 +0000 Subject: [PATCH 1/2] Initial plan From e8b71b2b0cf6770ceba06bec1b48a0e079abff7f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 17:18:20 +0000 Subject: [PATCH 2/2] feat: add AndroidEnableDiagnosticCrashReporting property to enable crash reporting before signal chaining Agent-Logs-Url: https://github.com/dotnet/android/sessions/55e4fb9d-2935-4e5a-961c-386c256574cc Co-authored-by: mdh1418 <16830051+mdh1418@users.noreply.github.com> --- .../docs-mobile/building-apps/build-properties.md | 15 +++++++++++++++ .../Microsoft.Android.Sdk.RuntimeConfig.targets | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/Documentation/docs-mobile/building-apps/build-properties.md b/Documentation/docs-mobile/building-apps/build-properties.md index 764074de9f3..2b46e92265a 100644 --- a/Documentation/docs-mobile/building-apps/build-properties.md +++ b/Documentation/docs-mobile/building-apps/build-properties.md @@ -372,6 +372,21 @@ called `desugar`, on the output of the `javac` compiler. The default value is `False` if using `$(AndroidDexTool)=dx` and `True` if using [`$(AndroidDexTool)`](#androiddextool)=`d8`. +## AndroidEnableDiagnosticCrashReporting + +A boolean property that controls whether the .NET runtime registers +its crash reporting signal handlers before Android's signal chaining +takes place. + +When `True`, the .NET runtime's crash reporting logic runs first +when a signal such as `SIGSEGV` or `SIGABRT` is received, allowing +managed callstacks to be logged and a crash report JSON file to be +written to disk before Android's signal handlers terminate the process. + +This property is `True` by default. + +Added in .NET 11. + ## AndroidEnableGooglePlayStoreChecks A bool property diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.RuntimeConfig.targets b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.RuntimeConfig.targets index 2cfc5e71200..ec09c3a00b7 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.RuntimeConfig.targets +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.RuntimeConfig.targets @@ -17,6 +17,9 @@ See: https://github.com/dotnet/runtime/blob/b13715b6984889a709ba29ea8a1961db469f On non-trimmed (Debug) builds, default to true so that debug.mono.log=gref continues to work as expected. --> <_AndroidEnableObjectReferenceLogging Condition=" '$(_AndroidEnableObjectReferenceLogging)' == '' And '$(PublishTrimmed)' == 'true' ">false <_AndroidEnableObjectReferenceLogging Condition=" '$(_AndroidEnableObjectReferenceLogging)' == '' And '$(PublishTrimmed)' != 'true' ">true + + true @@ -65,6 +68,11 @@ See: https://github.com/dotnet/runtime/blob/b13715b6984889a709ba29ea8a1961db469f Value="$(_AndroidEnableObjectReferenceLogging)" Trim="true" /> + +