.NET 9 Android: Very slow build times #27375
Replies: 19 comments 7 replies
-
For me it is also frequent "Waiting for Debugger to Attach" and freezed VS when breakpoint is hit. ='( |
Beta Was this translation helpful? Give feedback.
-
I am experiencing frequent issues with the Android Emulator while working with .NET MAUI. The emulator often stops working and gets stuck on "Waiting for Debugger to Attach." Even after resetting the emulator and applying the suggested fixes, the issue persists, making development highly frustrating. The time spent troubleshooting emulator problems significantly impacts productivity. I would like to request Microsoft to investigate and provide a more stable solution for the emulator to ensure a smoother development experience. |
Beta Was this translation helpful? Give feedback.
-
Anything we can do here? Working with Android is impossible right now. Build times are like 10 minutes in debug and then the build often won't start on the device. This is huge problem for us. Who can help here? |
Beta Was this translation helpful? Give feedback.
-
@davidortinau I want to bring this to your attention. Is there anything you can provide here on how to solve the long build times? |
Beta Was this translation helpful? Give feedback.
-
Are you building with |
Beta Was this translation helpful? Give feedback.
-
Perhaps @jonathanpeppers would know. |
Beta Was this translation helpful? Give feedback.
-
Well, in Visual studio windows, it is building iOS, Windows, even if you target Android. Which will make things even slower. |
Beta Was this translation helpful? Give feedback.
-
I am realizing an improvement in Net9's start times, both in Windows and Android. In the already open Android emulator, I see the logo after 16 seconds and the start page after 26 seconds when making one change on a C# page. Start with IDE, Hotreload on. When i first tested Net9 in November, i had more than 500 Warnings so i decided to return to Net8. Now, with no Xaml pages left, i decided to switch to Net9 again and it works well. I use MVVM but not the MVVM Toolkit. The release build needs more than 7 minutes. That is indeed too long. One should actually test the release more often because you can't rely on it behaving like the debug version. I do this far too seldom, perhaps once a month. I should do it daily. In the past, when i had slow start times, i found a too old license key for the syncfusion controls. I would check your Nugets for problems. |
Beta Was this translation helpful? Give feedback.
-
Ok, no problem. My understanding was the start time after changing something (F5). I thought this is relevant for working (with debugger). Build with F6 is indeed slower, but this is the same for all platforms because it builds all platforms. My App build time after one change in code (F6): Complete rebuild Solution in debug Complete Build Main App in Release: CPU not very fast, 100% all the time, 32GB Ram |
Beta Was this translation helpful? Give feedback.
-
I'm also experiencing this after a .NET 8 to .NET 9 (SDK 9.0.200) upgrade for a MAUI Blazor Hybrid app. It used to take 1-2 minutes and now it's taking about 8 minutes to build and deploy (Debug) to an Android emulator using JetBrains Rider 2024.3.6 on macOS 14.7.4 (Apple M3 Pro CPU). The build time for iOS seems faster now at least. |
Beta Was this translation helpful? Give feedback.
-
It would be nice to get some feedback from the team - either acknowledgment or if there is already WIP for this |
Beta Was this translation helpful? Give feedback.
-
Working with Android is a nightmare:
iOS builds take 4 time less and it always can connect to simulator |
Beta Was this translation helpful? Give feedback.
-
@MartyIX hey sorry to highlight you here again. Do you know any way on how we get some attention to this issue? Thanks so much. |
Beta Was this translation helpful? Give feedback.
-
I seems like there is some work being done on the dotnet/android project tracked here dotnet/android#9455 - not sure if this solves the issue. |
Beta Was this translation helpful? Give feedback.
-
Hi @jfversluis, just curious to know if Microsoft has provided any update on the fix? |
Beta Was this translation helpful? Give feedback.
-
Wasting a lot of time. ========== Rebuild completed at 1:44 PM and took 07:59.812 minutes ========== |
Beta Was this translation helpful? Give feedback.
-
Someone on our team figured out that you can change the |
Beta Was this translation helpful? Give feedback.
-
I have same issue with net9.0-android35.0. For a simple app it takes 5 minutes to build! |
Beta Was this translation helpful? Give feedback.
-
For me the issue was that for some reason the default build configuration for MAUI is Release now. Adding -c Debug to build should help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When upgrading our project from .NET 8 to .NET 9 the build times on local debug massively increased. It's easily 4x-5x slower making working with Android a pain. Also after the long build the app will often not start on the device and I need to start a 10 minutes build again.
Anyone else noticed this? Any ideas how to fix it?
Update: Some work is being done on the dotnet/android project that can be tracked here: dotnet/android#9455 - we will need to see if it solves the problem once released.
Beta Was this translation helpful? Give feedback.
All reactions