Android framework version
net10.0-android (Preview)
Affected platform version
.NET 10
Description
If I attempt dotnet-watch on a dotnet new maui-blazor template:
> dotnet watch -f net10.0-android
dotnet watch 🔥 Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
dotnet watch 💡 Press Ctrl+R to restart.
dotnet watch 🔨 Building D:\src\hellomauiblazor\hellomauiblazor.csproj ...
dotnet watch 🔨 Build succeeded: D:\src\hellomauiblazor\hellomauiblazor.csproj
Using launch settings from D:\src\hellomauiblazor\Properties\launchSettings.json...
Stopping: com.companyname.hellomauiblazor
Starting: Intent { cmp=com.companyname.hellomauiblazor/crc64bb58be9762961ef6.MainActivity }
dotnet watch ⌚ [hellomauiblazor (net10.0-android)] Exited
It thinks the app exited because dotnet run completed and there is not console output.
For alignment with other platforms, including dotnet new console, dotnet run for Android should:
- Show console output for the launched process
- Exit if the app closes
- Close the app on Ctrl+C
Implementation details
- We need a new public
$(WaitForExit) MSBuild property to get back to the existing behavior.
- iOS already has
$(_MlaunchWaitForExit)=false to do this.
- We need to implement this in a way that:
$(RunCommand) and $(RunArguments) can be executed by dotnet run CLI
- This may require a new Android console app/tool, depending on
adb shell options.
Steps to Reproduce
dotnet new android
dotnet run
Android framework version
net10.0-android (Preview)
Affected platform version
.NET 10
Description
If I attempt
dotnet-watchon adotnet new maui-blazortemplate:It thinks the app exited because
dotnet runcompleted and there is not console output.For alignment with other platforms, including
dotnet new console,dotnet runfor Android should:Implementation details
$(WaitForExit)MSBuild property to get back to the existing behavior.$(_MlaunchWaitForExit)=falseto do this.$(RunCommand)and$(RunArguments)can be executed bydotnet runCLIadb shelloptions.Steps to Reproduce
dotnet new androiddotnet run