Repository navigation
Unify Android run targets - #12906
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical target availability and debugger setup issues remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Unifies Android app launching through Microsoft.Android.Run, updates debugging/profiling integration, and removes the legacy run task.
Changes:
- Adds unified run behavior with wake/no-wait semantics.
- Preserves
StartAndroidActivitycompatibility and updates debugging routes. - Updates tests, resources, and documentation.
| File | Summary |
|---|---|
tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs |
Tests unified run behavior; alias coverage remains a nit (1 vote). |
src/Xamarin.AndroidTools/Debugging/ExecutionConfiguration.cs |
Updates debugging documentation. |
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Application.targets |
Adds compatibility alias; critical legacy-project target issue remains (4 votes). |
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildOrderTests.cs |
Tests run argument generation. |
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.Application.targets |
Defines Run; moderate debugger setup/cleanup issue remains (1 vote). |
src/Xamarin.Android.Build.Debugging.Tasks/Xamarin.Android.Common.Debugging.targets |
Removes legacy run path and updates native debugging. |
src/Xamarin.Android.Build.Debugging.Tasks/Tasks/RunActivity.cs |
Removes obsolete task implementation. |
src/Xamarin.Android.Build.Debugging.Tasks/Properties/Resources.resx |
Removes unused resource. |
src/Xamarin.Android.Build.Debugging.Tasks/Properties/Resources.Designer.cs |
Removes generated resource accessor. |
Documentation/docs-mobile/building-apps/build-targets.md |
Documents unified run and alias behavior. |
Files not reviewed (1)
- src/Xamarin.Android.Build.Debugging.Tasks/Properties/Resources.Designer.cs: Generated file
8e87cd4 to
d7fdb29
Compare
Route direct Run and StartAndroidActivity invocations through Microsoft.Android.Run, and remove the legacy RunActivity implementation. Co-authored-by: Copilot App <[email protected]>
d7fdb29 to
6c13be6
Compare
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
The target consolidation and focused run-argument coverage are useful, and all reported CI checks are green. However, replacing RunActivity with Microsoft.Android.Run preserves adb port forwarding but drops the device-side managed-debugger setup and cleanup. That breaks both debugger-attached launches and the isolation of subsequent non-debug launches; the inline comments identify the two behaviors that need to be retained.
Generated by Android PR Reviewer for #12906 · copilot · gpt56 · 130 AIC · ⌖ 11.2 AIC · ⊞ 25.9K
Comment /review to run again
- Migrate debugging-task device selection, ABI lookup, FastDeploy and app-detection to in-tree Android SDK tooling; remove the debugging tasks' project references to `Xamarin.AndroidTools` and `Mono.AndroidTools`. - Remove `GetGdbSymbols`, `ResolveXamarinAndroidTools`, and obsolete GDB debugging targets; retain `_ResolveXamarinAndroidTools` as a compatibility target for existing MSBuild dependencies. - Leave installer-side consumers and the legacy projects unchanged. The parent PR (#12906) removes `RunActivity`. Co-authored-by: Copilot App <[email protected]>
## Summary - Remove the `Mono.AndroidTools` and `Xamarin.AndroidTools` projects and their compiled assemblies from the workload SDK pack. - Migrate installer SDK/JDK discovery and macOS directory-size process execution to `Xamarin.Android.Tools.AndroidSdk`, preserving first-time installation when the SDK or JDK is absent. - Remove obsolete solution, build, packaging, and localization references; add installer discovery regression coverage. **Breaking change:** Tools referencing `Mono.AndroidTools.dll` or `Xamarin.AndroidTools.dll` directly must migrate to the supported shared Android SDK tooling APIs. Generated non-English `.resx` files under `src/Xamarin.AndroidTools/Properties/` remain untouched per repository localization policy; they are not compiled or packaged. Stacked on #12916 (which follows merged #12906). Co-authored-by: Copilot App <[email protected]>

Summary
Run,_AndroidAdbToolPath, and run-argument computation inMicrosoft.Android.Sdk.Application.targetsdotnet build -t:RunthroughMicrosoft.Android.Runwith non-waiting launch behavior while still waking the deviceRunis invoked directly, matchingdotnet run's build/deploy orderingStartAndroidActivityas a compatibility alias forRun_Runtarget andRunActivitytask implementationValidation
Xamarin.Android.Build.Debugging.TaskssuccessfullyXamarin.Android.Build.TaskssuccessfullyMSBuildDeviceIntegrationsuccessfullyBuildOrderTests.ComputeRunArgumentsIncludesDebuggerPortForwardingsuccessfullyRunemits--no-waitwithout--no-wake-deviceWaitForExit=falseretains both--no-waitand--no-wake-deviceRunTargetRespectsAndroidDeviceUserIdCI binlog: the failure occurred beforeMicrosoft.Android.Runlaunched becauseInstallattempted assembly resolution beforeUnnamedProject.dllexisted; addingBuildbeforeInstallfixes that target ordering