-
Notifications
You must be signed in to change notification settings - Fork 548
[msbuild/dotnet] Add support for listing the devices and simulators available to run on. #24279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: net11.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -16,11 +16,38 @@ Builds the source code within a project and all dependencies. | |||||
|
|
||||||
| Removes all files generated by the build process. | ||||||
|
|
||||||
| ## ComputeAvailableDevices | ||||||
|
|
||||||
| Queries and returns a list of available iOS or tvOS devices and simulators that can be used with `dotnet run`. | ||||||
|
|
||||||
| This target is called automatically by the .NET SDK's `dotnet run` command to | ||||||
| support device selection via the `--device` option. It returns a `@(Devices)`` | ||||||
|
||||||
| support device selection via the `--device` option. It returns a `@(Devices)`` | |
| support device selection via the `--device` option. It returns a `@(Devices)` |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar error: should be "The OS version of the device" instead of "The OS version if the device".
| - **OSVersion**: The OS version if the device | |
| - **OSVersion**: The OS version of the device |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2407,7 +2407,8 @@ | |||||
| <RelativeMlaunchPath Condition="'$(RelativeMlaunchPath)' == ''">$(XamarinRelativeSdkRootDirectory)tools\bin\mlaunch</RelativeMlaunchPath> | ||||||
| <_RelativeMlaunchPath Condition="'$(_RelativeMlaunchPath)' == ''">$(RelativeMlaunchPath)</_RelativeMlaunchPath> | ||||||
|
|
||||||
| <DeviceName Condition="'$(DeviceName)' == ''">$(_DeviceName)</DeviceName> | ||||||
| <!-- Try to keep _DeviceName working for a while yet --> | ||||||
| <Device Condition="'$(Device)' == ''">$(_DeviceName)</Device> | ||||||
|
Comment on lines
-2410
to
+2411
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need to keep |
||||||
| </PropertyGroup> | ||||||
|
|
||||||
| <Target | ||||||
|
|
@@ -2445,7 +2446,7 @@ | |||||
| <GetMlaunchArguments | ||||||
| SessionId="$(BuildSessionId)" | ||||||
| AppManifestPath="$(_AppBundleManifestPath)" | ||||||
| DeviceName="$(DeviceName)" | ||||||
| DeviceName="$(Device)" | ||||||
| InstallApp="$(_AppBundlePath)" | ||||||
| MlaunchPath="$(MlaunchPath)" | ||||||
| SdkDevPath="$(_SdkDevPath)" | ||||||
|
|
@@ -2558,6 +2559,33 @@ | |||||
| </PropertyGroup> | ||||||
| </Target> | ||||||
|
|
||||||
| <!-- | ||||||
| *********************************************************************************************** | ||||||
| ComputeAvailableDevices | ||||||
| Target that queries available devices and simulators. | ||||||
| This target is called by 'dotnet run' to support device selection. | ||||||
| Returns @(Devices) items with metadata: ??????? | ||||||
|
||||||
| Returns @(Devices) items with metadata: ??????? | |
| Returns @(Devices) items with metadata: Description, Type, OSVersion, UDID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a question... Will this work on Windows? Ideally, it could, but that could be future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent code formatting: The second command example should use backticks for consistency with the first example. Change
-p:Device=0000-aaaabbbbto`-p:Device=0000-aaaabbbb`.