-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Is your feature request related to a problem? Please describe.
In .NET 7, the ability to pass MSBuild properties was added to dotnet run
.
Unfortunately, this does not work for .NET MAUI projects, as we actually need an MSBuild target to run in order to deploy and launch an application on a mobile device.
To get an idea of our implementation currently:
We set $(RunCommand)
and $(RunArguments)
to launch a new process that runs dotnet build -t:Run
. At this point we don't know what MSBuild properties were passed to dotnet run
, so we don't have a way to pass them along.
Describe the solution you'd like
If optional workloads could opt into a new setting like $(UseTargetForRun)
(or choose a better name), it feels like the dotnet CLI should be able to invoke a Run
target directly instead of using $(RunCommand)
and $(RunArguments)
.
This would allow the MSBuild properties to pass through, and we aren't starting an unnecessary dotnet
process.
Additional context
This is important for CLI scenarios for .NET MAUI.