Skip to content

[coreclr] Add crash report build property - #12136

Merged
simonrozsival merged 2 commits into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers-enable-coreclr-crash-reports
Jul 17, 2026
Merged

simonrozsival merged 2 commits into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers-enable-coreclr-crash-reports

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Add an EnableCrashReport MSBuild property that writes DOTNET_EnableCrashReport=1 into the generated Android environment file for CoreCLR and NativeAOT applications. This allows crash reporting to be enabled before runtime startup.

Extend the environment-file tests to cover enabled and disabled values for CoreCLR, and document the property.

Android side of: dotnet/macios#26130

Tests were not run because the local .NET for Android SDK is not built in this worktree.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: f3e3a91e-159c-4ada-961c-67730ac064f9
Copilot AI review requested due to automatic review settings July 16, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an EnableCrashReport MSBuild property to enable early crash-report generation for CoreCLR-based Android apps by emitting DOTNET_EnableCrashReport=1 into the generated __environment__.txt file. This fits into the build pipeline’s existing environment-file generation used to configure runtime behavior before startup.

Changes:

  • Add EnableCrashReport handling to environment file generation.
  • Extend environment-file tests to include the new property.
  • Document EnableCrashReport in build-properties docs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets Adds DOTNET_EnableCrashReport=1 emission based on EnableCrashReport.
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs Extends environment variable tests to include crash report property scenarios.
Documentation/docs-mobile/building-apps/build-properties.md Documents the new EnableCrashReport build property.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: f3e3a91e-159c-4ada-961c-67730ac064f9
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Jul 16, 2026
@simonrozsival
simonrozsival merged commit 143d5fb into dotnet:main Jul 17, 2026
44 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants