I am having trouble building my Xamarin Forms project in Visual Studio. It takes 10 minutes or longer to build the Android project, even with a simple 1-line code/XAML change. I have scoured the web, MSDN, Visual Studio’s forums, StackOverflow, and here trying to find solutions to the problem. The PCL builds in ~3 seconds, I am not currently building the iOS one, and then the Android one just takes aaaaaaaaaages. It doesn't matter if its in debug mode or release mode, it is totally unworkable due to how long it takes to build.
- I have tried to upgrade and downgraded numerous Nuget packages for Xamarin and others (tried XF 4.0.0+, tried going back to 3.x, etc)
- I have tried to switch targeted Android versions from 9.0 to 8.1
- I have tried to switch the minimum Android Version from 5.0 up to 6.0
- I have tried building on both VS 2017, VS 2019, and the latest preview release of VS 2019. Same issue on them all.
- I have tried running VS as Administrator
- I have tried toggling every single configuration setting in Android Manifest and elsewhere
- I have tried uninstalling Hyper-V and Hypervisor (at a forum thread's suggestion)
- I have updated Windows 10 to the newest version
- I have submitted a bug report in VS with build logs and I haven't received any useful response yet
- I've deleted the BIN and OBJ folders a hundred times
- I've tried downgrading NETStandard from 2.0.3 to 2.0.0 and 2.0.1 (another random forum suggestion)
This worked a couple weeks ago when I last tried this project. I’m not sure whats changed. I used to be able to rapidly build/clean/debug without issue. I'm at my wit's end trying to figure out why this takes so long for a fairly small project.