Skip to content

[Android] Fix UseMonoRuntime check for CoreCLR R2R#34311

Merged
jfversluis merged 1 commit intodotnet:net11.0from
davidnguyen-tech:fix/android-r2r-usemonoruntime-check
Mar 5, 2026
Merged

[Android] Fix UseMonoRuntime check for CoreCLR R2R#34311
jfversluis merged 1 commit intodotnet:net11.0from
davidnguyen-tech:fix/android-r2r-usemonoruntime-check

Conversation

@davidnguyen-tech
Copy link
Member

@davidnguyen-tech davidnguyen-tech commented Mar 3, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Summary

Fixes the UseMonoRuntime check in the R2R configuration added by #33234.

dotnet/android does not set UseMonoRuntime for Release builds — it leaves the property empty/unset.

Fix: Change the condition from == 'false' to != 'true' so it correctly matches when UseMonoRuntime is empty (default in Release) or explicitly set to false.

dotnet/android does not set UseMonoRuntime to 'false' for CoreCLR -
it leaves the property empty/unset. Change the condition from
== 'false' to != 'true' so it correctly matches when UseMonoRuntime
is empty (CoreCLR) or explicitly set to false.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34311

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34311"

@davidnguyen-tech
Copy link
Member Author

/azp run maui-pr-devicetests,maui-pr-uitests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

Yes, I wouldn't compare == 'false' in MSBuild, in case it is blank. Sorry, we missed in code review.

It's best to always compare == 'true' and != 'true'.

@davidnguyen-tech
Copy link
Member Author

Yes, I wouldn't compare == 'false' in MSBuild, in case it is blank. Sorry, we missed in code review.

It's best to always compare == 'true' and != 'true'.

No worries :) thanks for the quick review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the Android CoreCLR Release ReadyToRun (R2R) enablement condition in the MAUI transitive build targets so the configuration applies when UseMonoRuntime is unset (the default behavior in dotnet/android Release builds), fixing the check introduced in #33234.

Changes:

  • Update the R2R gating condition from $(UseMonoRuntime) == 'false' to $(UseMonoRuntime) != 'true' so it matches both unset and explicitly-false cases.
  • Apply the updated condition consistently to both the PropertyGroup (R2R args/defaults) and ItemGroup (default MIBC includes).

You can also share your feedback on Copilot code review. Take the survey.

@davidnguyen-tech
Copy link
Member Author

The CI failures are either pre-existing or caused by flaky tests.

@jfversluis jfversluis merged commit 0866246 into dotnet:net11.0 Mar 5, 2026
116 of 213 checks passed
@davidnguyen-tech davidnguyen-tech deleted the fix/android-r2r-usemonoruntime-check branch March 5, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants