[msbuild] Improve interactive simulator selection by showing running simulators first. Fixes #25701#25772
[msbuild] Improve interactive simulator selection by showing running simulators first. Fixes #25701#25772rolfbjarne wants to merge 9 commits into
Conversation
… first - Sort booted simulators first in GetAvailableDevices output so the interactive device selection (dotnet run/watch) shows running simulators at the top of the list. - Add 'Status' metadata to device items (Booted/Shutdown for simulators, Paired for physical devices) matching the dotnet-run-for-maui spec. - Include OS version in the Description metadata for all devices so users can distinguish between devices running different OS versions. Fixes #25701 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Include the state (Booted/Shutdown) in the Description so it's visible in the interactive device selection on the command line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR updates the GetAvailableDevices MSBuild task output to improve the interactive dotnet run/watch device selection experience by prioritizing running (booted) simulators and enriching device metadata to better distinguish similar devices.
Changes:
- Sort available devices so Booted simulators appear first.
- Enhance
Descriptionmetadata to include OS versions and simulator state (Booted/Shutdown). - Emit
Statusmetadata (Booted/Shutdown for simulators; derived from pairing state for physical devices) and add a regression test for booted-first ordering.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| msbuild/Xamarin.MacDev.Tasks/Tasks/GetAvailableDevices.cs | Adds booted-first sorting and enriches per-device metadata (Description, Status) for devicectl + simctl results. |
| tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/GetAvailableDevicesTest.cs | Updates expectations for richer Description strings and adds a test ensuring booted simulators are listed first. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ractive-simulator-selection
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… pairing state `devicectl list devices` only lists devices it already knows about (i.e. paired devices), and may omit the `pairingState` field for such a device (e.g. when `tunnelState` is `unavailable`). Default the Status metadata to "Paired" in that case so these devices aren't reported with an empty status. This fixes the DeviceCtl1 test, whose iPad test data has no `pairingState` but is expected to report Status "Paired". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…no pairing state When `devicectl list devices` doesn't report a `pairingState` for a device, default the Status metadata to "Unpaired" rather than leaving it empty, and update the DeviceCtl1 test to expect "Unpaired" for the iPad test data (which has no `pairingState`). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ractive-simulator-selection
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #0220b45] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #0220b45] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #0220b45] Build passed (Build packages) ✅Pipeline on Agent |
🚀 [CI Build #0220b45] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 199 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Statusmetadata to device items (Booted/Shutdownfor simulators,Pairedfor physical devices) matching the dotnet-run-for-maui spec.Descriptionmetadata for simulators so users can distinguish between devices running different OS versions and see which ones are already running (e.g.,"iPhone 17 Pro - iOS 26.1 (Booted)"instead of just"iPhone 17 Pro").Descriptionmetadata for physical devices (e.g.,"Rolf's iPhone 15 - iOS 26.1"instead of just"Rolf's iPhone 15").It looks like this now:
Fixes #25701
🤖 Pull request created by Copilot