Skip to content

Android Emulator is missing if Android is not the first TargetFramework #29567

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

Open
arvz opened this issue May 18, 2025 · 8 comments
Open

Android Emulator is missing if Android is not the first TargetFramework #29567

arvz opened this issue May 18, 2025 · 8 comments
Labels
s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue t/bug Something isn't working

Comments

@arvz
Copy link

arvz commented May 18, 2025

Description

Image
Android Emulator is missing from the launch options.
This seems to have only started happening after the most recent Visual Studio update.
See below for full Visual Studio version info:
VisualStudio_VersionInfo.txt

The only thing that changed between when Android Emulator is there, and now is that I updated Visual Studio. event went back to old commits to double check.

I determined the cause is this:

<TargetFrameworks>net9.0-maccatalyst;net9.0-ios;net9.0-android</TargetFrameworks>

In my project, the <TargetFramework> lists android as the last entry.
When creating MAUI projects by default, Android is always the first item.

Simply by changing it so Android is the first item, the problem is fixed (after restarting Visual Studio)

Steps to Reproduce

  1. Create a new .NET MAUI App Project 'MauiApp1'
  2. Observe that Android Emulator launch options are present.
  3. Open the 'MauiApp1' csproj file
  4. Change the line:
    <TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
    to:
    <TargetFrameworks>net9.0-ios;net9.0-android;net9.0-maccatalyst</TargetFrameworks>
  5. Fully quit Visual Studio, and then re-open the project
  6. Observe that Android Emulator options are no longer present.

Link to public reproduction project repository

No response

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

I just re-arrange the Target Frameworks so Android is the first item, and it's working fine. But this has to point to a bug recently introduced which could be indicative of a deeper issue.

Relevant log output

@arvz arvz added the t/bug Something isn't working label May 18, 2025
@jfversluis jfversluis added the s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue label May 18, 2025
@baaaaif
Copy link

baaaaif commented May 19, 2025

Thanks for the workaround. I've been missing the emulator, too, and I would never have thought of that order.

@sumowesley
Copy link

Thanks for the workaround. I've been missing the emulator, too, and I would never have thought of that order.

Same here

@christophbue
Copy link

Same here. Thanks for the workaround!

@taublast
Copy link
Contributor

Could be a deeper problem indeed, rather a Visual Studio issue. When playing with 2 instances of VS the second one didn't show android run target at all, while first one had it. Closed both, deleted bin obj, opened one new fresh instance: had android run target dissapeared completely. Only a PC reboot helped. Maybe it locked some files inside .vs folder, no idea.

@mobilewares
Copy link

Thank you so much for finding workaround - this was driving me nuts this morning since the upgrade.

@RobTF
Copy link

RobTF commented May 21, 2025

Seems to be related to VS 17.14.0

Ah thanks - I've been using Rider as a workaround. Another silly regression that makes the toolchain feel even more wobbly - to be fair this may not be MAUI related, more like VS itself?

Possibly related; we've also noticed that archiving an Android app just runs indefinitely now and have had to resort to the command line.

@taublast
Copy link
Contributor

Yep, archiving Android inside VS is broken for like half a year for me now, using command line only for that. But doubt it's related to this bug, sorry for offtopic.

@TheSundayDev
Copy link

Same here. Thanks for the workaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants