I want to share a solution for an issue where, after updating Visual Studio (17.14.0 in my case), the Android Emulator run options stopped appearing in the dropdown list.
The emulator existed and was working, and I tried multiple clean/rebuild attempts with manual file deletions. However, the issue persisted. Interestingly, a newly created MAUI project in the same solution worked fine.
The issue was caused by the order of platform targets in the TargetFrameworks list:
<TargetFrameworks>net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
As you can see, I had included net9.0 for Unit Tests. This setup worked fine in previous versions of Visual Studio, but it seems that the new version expects the platform-specific target (e.g., net9.0-android) to be listed first. For some reason, I had device profiles for iOS but not for Android.
The issue was resolved when I moved net9.0 to the end of the list, like this:
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0</TargetFrameworks>
After making this change, the Android Emulator run options reappeared in the dropdown list.
I hope my experience helps save you a lot of time if you encounter a similar issue.
Update:
Unfortunately, now I have a working project, but not working tests. :) After some experiments I was able to resolve the issue by moving net9.0
to second position:
<TargetFrameworks>net9.0-android;net9.0;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
Seems like a magic hack.