[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 4 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.
✅ [PR Build #6834252] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #6834252] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ 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 |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #6834252] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #6834252] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 27 tests failed, 180 tests passed. Failures❌ introspection tests2 tests failed, 2 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (iOS)20 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ msbuild tests1 tests failed, 1 tests passed.Failed tests
Html Report (VSDrops) Download ❌ windows tests1 tests failed, 2 tests passed.Failed tests
Html Report (VSDrops) Download ❌ xcframework tests2 tests failed, 2 tests passed.Failed tests
Html Report (VSDrops) Download ❌ Tests on macOS Tahoe (26) tests1 tests failed, 4 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download |
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