Repository navigation
[release/11.0.1xx] [Xamarin.Android.Build.Tasks] Skip RID-inner device checks - #13731
Merged
jonathanpeppers merged 1 commit intoNov 23, 2026
Conversation
…uilds (#13304) Backport of #13304. Skip the `_EnsureDeviceBooted` target when `$(_ComputeFilesToPublishForRuntimeIdentifiers)` is `true`, so publish-only RID inner builds do not repeat the outer build's device boot check. Add the `DeviceBootIsLimitedToOuterBuilds` regression test. Conflict resolution: `BuildOrderTests.cs` on main contains other tests that are not on this branch. Only the new test and its `using` lines were kept. (cherry picked from commit dc2dd52) Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change to avoid redundant device boot checks in publish-only inner builds.
No open issues 🎉
What changed in this PR
Backports #13304 to release/11.0.1xx, avoiding repeated device boot checks in publish-only runtime-identifier inner builds while preserving outer-build and deployment behavior.
Changes:
- Skip
_EnsureDeviceBootedwhen_ComputeFilesToPublishForRuntimeIdentifiersistrue, with an explanatory comment. - Add three regression cases covering inner builds, outer builds with a selected device, and empty device selection.
| File | Description |
|---|---|
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildOrderTests.cs | Tests the boot condition, execution order, and single execution. |
| src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Application.targets | Guards device boot checks in publish-only inner builds. |
Review effort: Balanced
7 tasks
Member
Author
|
@dalexsoto review |
jonathanpeppers
enabled auto-merge (squash)
November 23, 2026 21:22
simonrozsival
approved these changes
Nov 23, 2026
jonathanpeppers
deleted the
jonathanpeppers-backport-rid-inner-device-checks
branch
November 23, 2026 22:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #13304.
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include:Why
dotnet runwith a selected$(Device)repeated<BootAndroidEmulator/>in publish-only RID inner builds.<GetPrimaryCpuAbi/>already skips its device query there. This change addsand '$(_ComputeFilesToPublishForRuntimeIdentifiers)' != 'true'to the_EnsureDeviceBootedtarget condition inMicrosoft.Android.Sdk.Application.targets, with a comment. The outer-build hook and the explicit deployment/run-argument dependencies do not change.Changes
Microsoft.Android.Sdk.Application.targets: new_EnsureDeviceBootedcondition and comment (applied cleanly).BuildOrderTests.cs: new testDeviceBootIsLimitedToOuterBuilds(3 cases: inner build, outer build withDevice, emptyDevice).Conflict resolution
git cherry-pick -x dc2dd5208f26e1bf46a599293f851b70eb1d0aebhad one conflict, inBuildOrderTests.cs. Onmain, that file contains other tests that are not on this branch (for exampleRunWithLoggingEnablesManagedTimingLogger). I kept only the newDeviceBootIsLimitedToOuterBuildstest and theusinglines that it needs (System.IO,System.Linq,System.Xml.Linq,Microsoft.Build.Construction,Microsoft.Build.Evaluation,Microsoft.Build.Execution). No other tests or-mtcode were brought over.Validation
git merge-base HEAD origin/release/11.0.1xx→8e578c48bf, the same as theorigin/release/11.0.1xxtip. Passed._EnsureDeviceBootedcondition from the changed targets file into a small.projand randotnet msbuild t.proj -t:_GetPrimaryCpuAbi -nologo -v:m -p:Device=<d> -p:_ComputeFilesToPublishForRuntimeIdentifiers=<i>:Device=selected, inner=true→ exit 0, boot target skipped. Passed.Device=selected, inner=`` → exit 0, boot target ran. Passed.Device=, inner=`` → exit 0, boot target skipped. Passed.Xamarin.Android.Build.Testslocally, because that needs a full repository build. The full validation runs in CI.