[Android] Fix UseMonoRuntime check for CoreCLR R2R#34311
[Android] Fix UseMonoRuntime check for CoreCLR R2R#34311jfversluis merged 1 commit intodotnet:net11.0from
Conversation
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>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34311Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34311" |
|
/azp run maui-pr-devicetests,maui-pr-uitests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
jonathanpeppers
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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) andItemGroup(default MIBC includes).
You can also share your feedback on Copilot code review. Take the survey.
|
The CI failures are either pre-existing or caused by flaky tests. |
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
UseMonoRuntimecheck in the R2R configuration added by #33234.dotnet/androiddoes not setUseMonoRuntimefor Release builds — it leaves the property empty/unset.Fix: Change the condition from
== 'false'to!= 'true'so it correctly matches whenUseMonoRuntimeis empty (default in Release) or explicitly set tofalse.