From 7207fdd5d9f103605080b2a1031fa6d66681427c Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Thu, 16 Oct 2025 14:36:30 -0500 Subject: [PATCH 01/13] [spec] better `dotnet run` extensibility for .NET MAUI --- documentation/specs/dotnet-run-for-maui.md | 209 +++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 documentation/specs/dotnet-run-for-maui.md diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md new file mode 100644 index 000000000000..07fa2b71042d --- /dev/null +++ b/documentation/specs/dotnet-run-for-maui.md @@ -0,0 +1,209 @@ +# `dotnet run` for .NET MAUI Scenarios + +The current state of `dotnet run` for .NET MAUI projects is summarized +by this issue from 2021: + +* [Figure out 'dotnet run' CLI experience for iOS and Android](https://github.com/dotnet/xamarin/issues/26) + +The pain points being: + +* iOS and Android use different properties to select a device, + emulator, or simulator. It is difficult for developers to make this + selection as you need to run platform-specific commands along with + complex MSBuild properties. + +* Each platform has different behavior, regards to displaying console + output, etc. + +* Using a MSIX with WindowsAppSDK doesn't support `dotnet run` at all, + relying completely on IDEs like Visual Studio. + +* `dotnet run` does not have a concept of a "deploy" step. + +This has become more relevant in the AI era, as someone is going to +expect AIs in "agent mode" to build and run their app. If the +command-line options are difficult, AIs will fail just as badly as +humans are today. + +## The `dotnet run` Pipeline + +These are the high-level steps during `dotnet run`, that we would like +to make extensible for .NET MAUI (and future) scenarios. + +* `restore`: unchanged + +* "Pre-run evaluation" + + * If the project is multi-targeted, containing the + `$(TargetFrameworks)` property, and `-f` was not supplied... + + * Prompt the user to select from a list of the + `$(TargetFrameworks)` + + * Non-interactive mode will give a friendly error message, + suggesting to supply the `-f` property, listing available target + frameworks in the project. + + * Once a `$(TargetFramework)` is selected, either from previous + steps or `-f`... + + * If a `ComputeAvailableTargets` target is available, provided by + the iOS or Android workload, etc. ... + + * Call the target, which returns a list of `@(RunTargets)` items... + +```xml + + + + + + + + + + + +``` + +_NOTE: each workload can decide which metadata values for `%(Type)` +and `%(Status)` are useful, filtering offline devices, etc. The output +above would be analogous to running `adb devices`, `xcrun simctl list +devices`, or `xcrun devicectl list devices`._ + +* Continuing on... + + * Prompt the user to select from this list of devices, emulators, + or simulators. + + * Non-interactive mode will error, suggesting to supply the + `--target|-t` switch. Listing the options returned by the + `ComputeAvailableTargets` MSBuild target. + +* `build`: unchanged, but is passed `-p:RunTarget`. + +* `deploy` + + * If a `DeployToRunTarget` MSBuild target is available, provided by the + iOS or Android workload, etc. + + * Call the target, passing in the identifier for the selected + `-p:RunTarget` global MSBuild property. + + * This step needs to run, even with `--no-build`, as you may have + selected a different device. + +* `ComputeRunArguments`: unchanged, but is passed `-p:RunTarget`. + +* `run`: unchanged. `ComputeRunArguments` should have set a valid + `$(RunCommand)` and `$(RunArguments)` using the value supplied by + `-p:RunTarget`. + +## New `dotnet run` Command-line Switches + +So far, it feels like no new subcommand is needed. In interactive +mode, `dotnet run` will now prompt to select a `$(TargetFramework)` +for all multi-targeted projects. Platform-specific projects like +Android, iOS, etc. will prompt for device selection. + +`dotnet run --list` will: + +* Prompt for `$(TargetFramework)` for multi-targeted projects just + like when `--list` is omitted. + + * If there is a single `$(TargetFramework)`, it can just print a + friendly message and exit. + +* Call `ComputeAvailableTargets` just like when `--list` is omitted. + + * List the available targets by name, a unique identifier, and an + optional status of the device. + + * Print a friendly message that says how to run `dotnet run` with + the new `--target|-t` switch. + + * If `ComputeAvailableTargets` does not exist in the project + (workload), it can print a friendly message and exit. + +* `dotnet run --list` will then basically exit early, never running + any build, deploy, `ComputeRunArguments`, or run steps. + +A new `--target|-t` switch will: + +* Pass in the `-p:RunTarget` global MSBuild property to all build, + deploy, `ComputeRunArguments`, or run steps. + +* The iOS and Android workloads will know how to interpret `$(RunTarget)` + to select an appropriate device, emulator, or simulator. + +## What about Launch Profiles? + +The iOS and Android workloads ignore all +`Properties/launchSettings.json` files and do nothing with them. + +WindowsAppSDK requires a launch profile to select between "packaged" +MSIX and an "unpackaged" .exe, and so we currently provide this in the +`dotnet new maui` project template: + +```json +{ + "profiles": { + "Windows Machine": { + "commandName": "Project", + "nativeDebugging": false + } + } +} +``` + +Or if you want to be "packaged": + +```json +{ + "profiles": { + "Windows Machine": { + "commandName": "MsixPackage", + "nativeDebugging": false + } + } +} +``` + +Launch profiles don't immediately look useful for iOS or Android, as +the identifier you'd put in here would be different per developer -- +you wouldn't want the value saved in source control. You could put a +generic selection like device vs emulator/simulator, but that isn't +addressing the problem we are interested in. Full launch profile +support for .NET MAUI projects may be interesting to address in the +future. + +## iOS and Android workload behavior + +We will work to align as much behavior as possible between the +platforms. Most of this work will happen in the dotnet/android and +dotnet/macios repo, and would be orthogonal to the changes in the .NET +SDK. + +## macOS and MacCatalyst Behavior + +`dotnet run` "just works" on macOS Desktop, because `$(RunCommand)` +can launch the app directly -- similar to console apps. + +## WindowsAppSDK Behavior + +Running a `dotnet new maui` project works today because of the default +launch profile in "unpackaged" mode: + +```dotnetcli +> dotnet run -f net10.0-windows10.0.19041.0 +Using launch settings from D:\src\hellomaui\Properties\launchSettings.json... +``` + +To improve the behavior for "packaged" / MSIX, we could: + +* Implement the `DeployToRunTarget` MSBuild target. + +* Implement the `ComputeRunArguments` MSBuild target. + +In the future, we can either add this logic into the .NET MAUI +workload or WindowsAppSDK itself. From 7655f8c8d4ba57c0398737adb11c9fccdf9b6bd8 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 11:41:57 -0500 Subject: [PATCH 02/13] Update documentation/specs/dotnet-run-for-maui.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- documentation/specs/dotnet-run-for-maui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 07fa2b71042d..bf0272143fdd 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -15,7 +15,7 @@ The pain points being: * Each platform has different behavior, regards to displaying console output, etc. -* Using a MSIX with WindowsAppSDK doesn't support `dotnet run` at all, +* Using an MSIX with WindowsAppSDK doesn't support `dotnet run` at all, relying completely on IDEs like Visual Studio. * `dotnet run` does not have a concept of a "deploy" step. From f86ea04dd625869c0c9a1c9a56150640780df283 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 12:18:59 -0500 Subject: [PATCH 03/13] Update documentation/specs/dotnet-run-for-maui.md Co-authored-by: Chet Husk --- documentation/specs/dotnet-run-for-maui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index bf0272143fdd..5d2e5bb0c84b 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -35,7 +35,7 @@ to make extensible for .NET MAUI (and future) scenarios. * "Pre-run evaluation" * If the project is multi-targeted, containing the - `$(TargetFrameworks)` property, and `-f` was not supplied... + `$(TargetFrameworks)` property _and_ that property has more than one item in it, and `-f` was not supplied... * Prompt the user to select from a list of the `$(TargetFrameworks)` From be8607e300e391eb480cd78cd7da6290607627c1 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 12:19:07 -0500 Subject: [PATCH 04/13] Update documentation/specs/dotnet-run-for-maui.md Co-authored-by: Chet Husk --- documentation/specs/dotnet-run-for-maui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 5d2e5bb0c84b..8b0ac039cb6b 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -106,7 +106,7 @@ mode, `dotnet run` will now prompt to select a `$(TargetFramework)` for all multi-targeted projects. Platform-specific projects like Android, iOS, etc. will prompt for device selection. -`dotnet run --list` will: +`dotnet run --list-targets` will: * Prompt for `$(TargetFramework)` for multi-targeted projects just like when `--list` is omitted. From 478de96ef70155410a6313c2c4373815a8e664f0 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 12:19:17 -0500 Subject: [PATCH 05/13] Update documentation/specs/dotnet-run-for-maui.md Co-authored-by: Chet Husk --- documentation/specs/dotnet-run-for-maui.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 8b0ac039cb6b..c02cf5d2039a 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -130,6 +130,8 @@ Android, iOS, etc. will prompt for device selection. A new `--target|-t` switch will: +* bypass the target-selection portion of the `run` workflow described above + * Pass in the `-p:RunTarget` global MSBuild property to all build, deploy, `ComputeRunArguments`, or run steps. From b2b3be70708e412014ca5428ca73e34eb46835cb Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 12:23:00 -0500 Subject: [PATCH 06/13] Update dotnet-run-for-maui.md --- documentation/specs/dotnet-run-for-maui.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index c02cf5d2039a..e497ae452c00 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -35,7 +35,8 @@ to make extensible for .NET MAUI (and future) scenarios. * "Pre-run evaluation" * If the project is multi-targeted, containing the - `$(TargetFrameworks)` property _and_ that property has more than one item in it, and `-f` was not supplied... + `$(TargetFrameworks)` property _and_ that property has more than + one item in it, and `-f` was not supplied... * Prompt the user to select from a list of the `$(TargetFrameworks)` @@ -109,12 +110,13 @@ Android, iOS, etc. will prompt for device selection. `dotnet run --list-targets` will: * Prompt for `$(TargetFramework)` for multi-targeted projects just - like when `--list` is omitted. + like when `--list-targets` is omitted. * If there is a single `$(TargetFramework)`, it can just print a friendly message and exit. -* Call `ComputeAvailableTargets` just like when `--list` is omitted. +* Call `ComputeAvailableTargets` just like when `--list-targets` is + omitted. * List the available targets by name, a unique identifier, and an optional status of the device. @@ -125,8 +127,8 @@ Android, iOS, etc. will prompt for device selection. * If `ComputeAvailableTargets` does not exist in the project (workload), it can print a friendly message and exit. -* `dotnet run --list` will then basically exit early, never running - any build, deploy, `ComputeRunArguments`, or run steps. +* `dotnet run --list-targets` will then basically exit early, never + running any build, deploy, `ComputeRunArguments`, or run steps. A new `--target|-t` switch will: From 67d45c23b21e2eeb69e9632d58eec018e66352f9 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 12:23:17 -0500 Subject: [PATCH 07/13] Mention other frameworks --- documentation/specs/dotnet-run-for-maui.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index e497ae452c00..6d7a9b4a4aad 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -211,3 +211,11 @@ To improve the behavior for "packaged" / MSIX, we could: In the future, we can either add this logic into the .NET MAUI workload or WindowsAppSDK itself. + +## Other frameworks: Avalonia, Uno, MonoGame, etc. + +When these frameworks run on iOS or Android, they are basically using +the `ios` and `android` workloads *without* .NET MAUI. Any iOS or +Android-specific behavior would apply to these project types in the +same way a `dotnet new android` or `dotnet new ios` project template +would. From 121d09aba55ed3d2eb044c44aaaf433bb1126c40 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 12:26:51 -0500 Subject: [PATCH 08/13] Update documentation/specs/dotnet-run-for-maui.md Co-authored-by: Rolf Bjarne Kvinge --- documentation/specs/dotnet-run-for-maui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 6d7a9b4a4aad..d1138f261aa2 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -23,7 +23,7 @@ The pain points being: This has become more relevant in the AI era, as someone is going to expect AIs in "agent mode" to build and run their app. If the command-line options are difficult, AIs will fail just as badly as -humans are today. +humans do today. ## The `dotnet run` Pipeline From c7699a22345c35ebf7a7b645133d9b2d03683948 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 17 Oct 2025 14:26:16 -0500 Subject: [PATCH 09/13] Update dotnet-run-for-maui.md --- documentation/specs/dotnet-run-for-maui.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index d1138f261aa2..29f928fce714 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -48,7 +48,7 @@ to make extensible for .NET MAUI (and future) scenarios. * Once a `$(TargetFramework)` is selected, either from previous steps or `-f`... - * If a `ComputeAvailableTargets` target is available, provided by + * If a `ComputeAvailableRunTargets` target is available, provided by the iOS or Android workload, etc. ... * Call the target, which returns a list of `@(RunTargets)` items... @@ -79,7 +79,7 @@ devices`, or `xcrun devicectl list devices`._ * Non-interactive mode will error, suggesting to supply the `--target|-t` switch. Listing the options returned by the - `ComputeAvailableTargets` MSBuild target. + `ComputeAvailableRunTargets` MSBuild target. * `build`: unchanged, but is passed `-p:RunTarget`. @@ -115,7 +115,7 @@ Android, iOS, etc. will prompt for device selection. * If there is a single `$(TargetFramework)`, it can just print a friendly message and exit. -* Call `ComputeAvailableTargets` just like when `--list-targets` is +* Call `ComputeAvailableRunTargets` just like when `--list-targets` is omitted. * List the available targets by name, a unique identifier, and an @@ -124,7 +124,7 @@ Android, iOS, etc. will prompt for device selection. * Print a friendly message that says how to run `dotnet run` with the new `--target|-t` switch. - * If `ComputeAvailableTargets` does not exist in the project + * If `ComputeAvailableRunTargets` does not exist in the project (workload), it can print a friendly message and exit. * `dotnet run --list-targets` will then basically exit early, never From 527e5d1c618de6cc4686afedba4879ac41c7d898 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 20 Oct 2025 12:26:05 -0500 Subject: [PATCH 10/13] Naming! --- documentation/specs/dotnet-run-for-maui.md | 56 +++++++++++----------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 29f928fce714..15a32ebb814e 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -48,22 +48,22 @@ to make extensible for .NET MAUI (and future) scenarios. * Once a `$(TargetFramework)` is selected, either from previous steps or `-f`... - * If a `ComputeAvailableRunTargets` target is available, provided by + * If a `ComputeAvailableDevices` target is available, provided by the iOS or Android workload, etc. ... - * Call the target, which returns a list of `@(RunTargets)` items... + * Call the target, which returns a list of `@(Devices)` items... ```xml - - - + + + - - - - + + + + ``` @@ -78,27 +78,27 @@ devices`, or `xcrun devicectl list devices`._ or simulators. * Non-interactive mode will error, suggesting to supply the - `--target|-t` switch. Listing the options returned by the - `ComputeAvailableRunTargets` MSBuild target. + `--device|-d` switch. Listing the options returned by the + `ComputeAvailableDevices` MSBuild target. -* `build`: unchanged, but is passed `-p:RunTarget`. +* `build`: unchanged, but is passed `-p:Device`. * `deploy` - * If a `DeployToRunTarget` MSBuild target is available, provided by the + * If a `DeployToDevice` MSBuild target is available, provided by the iOS or Android workload, etc. * Call the target, passing in the identifier for the selected - `-p:RunTarget` global MSBuild property. + `-p:Device` global MSBuild property. * This step needs to run, even with `--no-build`, as you may have selected a different device. -* `ComputeRunArguments`: unchanged, but is passed `-p:RunTarget`. +* `ComputeRunArguments`: unchanged, but is passed `-p:Device`. * `run`: unchanged. `ComputeRunArguments` should have set a valid `$(RunCommand)` and `$(RunArguments)` using the value supplied by - `-p:RunTarget`. + `-p:Device`. ## New `dotnet run` Command-line Switches @@ -107,37 +107,37 @@ mode, `dotnet run` will now prompt to select a `$(TargetFramework)` for all multi-targeted projects. Platform-specific projects like Android, iOS, etc. will prompt for device selection. -`dotnet run --list-targets` will: +`dotnet run --list-devices` will: * Prompt for `$(TargetFramework)` for multi-targeted projects just - like when `--list-targets` is omitted. + like when `--list-devices` is omitted. * If there is a single `$(TargetFramework)`, it can just print a friendly message and exit. -* Call `ComputeAvailableRunTargets` just like when `--list-targets` is +* Call `ComputeAvailableDevices` just like when `--list-devices` is omitted. * List the available targets by name, a unique identifier, and an optional status of the device. * Print a friendly message that says how to run `dotnet run` with - the new `--target|-t` switch. + the new `--device|-d` switch. - * If `ComputeAvailableRunTargets` does not exist in the project + * If `ComputeAvailableDevices` does not exist in the project (workload), it can print a friendly message and exit. -* `dotnet run --list-targets` will then basically exit early, never +* `dotnet run --list-devices` will then basically exit early, never running any build, deploy, `ComputeRunArguments`, or run steps. -A new `--target|-t` switch will: +A new `--device|-d` switch will: * bypass the target-selection portion of the `run` workflow described above -* Pass in the `-p:RunTarget` global MSBuild property to all build, +* Pass in the `-p:Device` global MSBuild property to all build, deploy, `ComputeRunArguments`, or run steps. -* The iOS and Android workloads will know how to interpret `$(RunTarget)` +* The iOS and Android workloads will know how to interpret `$(Device)` to select an appropriate device, emulator, or simulator. ## What about Launch Profiles? @@ -205,7 +205,9 @@ Using launch settings from D:\src\hellomaui\Properties\launchSettings.json... To improve the behavior for "packaged" / MSIX, we could: -* Implement the `DeployToRunTarget` MSBuild target. +* Implement the `DeployToDevice` MSBuild target. + +* `ComputeAvailableDevices` is not needed. * Implement the `ComputeRunArguments` MSBuild target. @@ -215,7 +217,7 @@ workload or WindowsAppSDK itself. ## Other frameworks: Avalonia, Uno, MonoGame, etc. When these frameworks run on iOS or Android, they are basically using -the `ios` and `android` workloads *without* .NET MAUI. Any iOS or +the `ios` and `android` workloads _without_ .NET MAUI. Any iOS or Android-specific behavior would apply to these project types in the same way a `dotnet new android` or `dotnet new ios` project template would. From 4d9d5ff655ee728fdd2fda1ca861b6145cc30cb4 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 20 Oct 2025 12:26:54 -0500 Subject: [PATCH 11/13] Remove `-d` --- documentation/specs/dotnet-run-for-maui.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 15a32ebb814e..9cb61e8dec20 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -78,7 +78,7 @@ devices`, or `xcrun devicectl list devices`._ or simulators. * Non-interactive mode will error, suggesting to supply the - `--device|-d` switch. Listing the options returned by the + `--device` switch. Listing the options returned by the `ComputeAvailableDevices` MSBuild target. * `build`: unchanged, but is passed `-p:Device`. @@ -122,7 +122,7 @@ Android, iOS, etc. will prompt for device selection. optional status of the device. * Print a friendly message that says how to run `dotnet run` with - the new `--device|-d` switch. + the new `--device` switch. * If `ComputeAvailableDevices` does not exist in the project (workload), it can print a friendly message and exit. @@ -130,7 +130,7 @@ Android, iOS, etc. will prompt for device selection. * `dotnet run --list-devices` will then basically exit early, never running any build, deploy, `ComputeRunArguments`, or run steps. -A new `--device|-d` switch will: +A new `--device` switch will: * bypass the target-selection portion of the `run` workflow described above From a28b1b7eb36a1494b66c4d81df23f7ee131d0bec Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 20 Oct 2025 12:30:00 -0500 Subject: [PATCH 12/13] Update dotnet-run-for-maui.md --- documentation/specs/dotnet-run-for-maui.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 9cb61e8dec20..26c35bff316a 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -112,11 +112,10 @@ Android, iOS, etc. will prompt for device selection. * Prompt for `$(TargetFramework)` for multi-targeted projects just like when `--list-devices` is omitted. - * If there is a single `$(TargetFramework)`, it can just print a - friendly message and exit. + * If there is a single `$(TargetFramework)`, skip to the next step. -* Call `ComputeAvailableDevices` just like when `--list-devices` is - omitted. +* Call `ComputeAvailableDevices` if the MSBuild target exists, just + like when `--list-devices` is omitted. * List the available targets by name, a unique identifier, and an optional status of the device. From bac3b65c7cf85be8d9cee9fbe98802cca923a877 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 21 Oct 2025 13:59:00 -0500 Subject: [PATCH 13/13] Update dotnet-run-for-maui.md --- documentation/specs/dotnet-run-for-maui.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/specs/dotnet-run-for-maui.md b/documentation/specs/dotnet-run-for-maui.md index 26c35bff316a..6ee879a91010 100644 --- a/documentation/specs/dotnet-run-for-maui.md +++ b/documentation/specs/dotnet-run-for-maui.md @@ -48,10 +48,10 @@ to make extensible for .NET MAUI (and future) scenarios. * Once a `$(TargetFramework)` is selected, either from previous steps or `-f`... - * If a `ComputeAvailableDevices` target is available, provided by + * If a `ComputeAvailableDevices` MSBuild target is available, provided by the iOS or Android workload, etc. ... - * Call the target, which returns a list of `@(Devices)` items... + * Call the MSBuild target, which returns a list of `@(Devices)` items... ```xml @@ -88,7 +88,7 @@ devices`, or `xcrun devicectl list devices`._ * If a `DeployToDevice` MSBuild target is available, provided by the iOS or Android workload, etc. - * Call the target, passing in the identifier for the selected + * Call the MSBuild target, passing in the identifier for the selected `-p:Device` global MSBuild property. * This step needs to run, even with `--no-build`, as you may have @@ -131,7 +131,7 @@ Android, iOS, etc. will prompt for device selection. A new `--device` switch will: -* bypass the target-selection portion of the `run` workflow described above +* bypass the device-selection portion of the `run` workflow described above * Pass in the `-p:Device` global MSBuild property to all build, deploy, `ComputeRunArguments`, or run steps.