dotnet / dotnet/maui

Cannot "Stop" Release Build for Android in Visual Studio Without Crashing Visual Studio or Unplugging Device

Open
#30,735 10 comments 0 reactions 0 assignees View on GitHub
area-tooling partner/android platform/android s/move-to-vs-feedback t/bug
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

### Description

It has become impossible to "Stop" a Release Build inside Visual Studio via when building to a physical Android device.

Pressing the stop button now just crashes Visual Studio, and you have to Ctrl+Alt+Del to end Visual Studio. Otherwise it just stays hung.

The only way to circumvent this I have found is to unplug the device (which averts the crash).

### Steps to Reproduce

1. Start a basic blank Maui app (repro project is default Maui project)
2. Select an attached USB Android phone (e.g., Samsung)
3. Switch to "Release" option and click the ▶ button to build.
4. Let it run on the device, then try to click Stop ⏹.
5. Visual Studio will hang, forcing unplug of device or Ctrl+Alt+Del to get free.
Image

### Link to public reproduction project repository

https://github.com/jonmdev/DefaultAppBug

### Version with bug

9.0.90 SR9

### Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

### Last version that worked well

Unknown/Other

### Affected platforms

Android

### Did you find any workaround?

Unplug the device or Ctrl+Alt+Del - don't press stop button, won't work.

Contributor guide

Open the contributing guide

Research direction

Begin with the linked DefaultAppBug reproduction project and reproduce the Release build on a physical USB Android device in Visual Studio 9.0.90 SR9. Observe the Stop action and trace the MAUI build or device-handling path involved; done means stopping cleanly without a Visual Studio hang or crash and without unplugging the device.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.