Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin build-times extremely slow

I have developed several (experimental and prototype) iOS apps using Xamarin and the new Visual Studio for Mac OS and the build-times intermittently take about 5-10 minutes on average. When starting a new project, build-times are fine. After a few changes in the source code while working on my apps (no specific changes). For no reason, build times start increasing to 5-10 minutes. I've tried all possible build-options (linking, no linking, SDK versions, new consigning certificate, etc..).

Upon investigation with the Activities-app (Mac OS, Sierra) i find that the "codesign" process is taking up 110% CPU and runs for as long as the build takes to complete.

Does anyone have any experience with this problem?

like image 908
Léon Avatar asked Dec 02 '16 08:12

Léon


3 Answers

I have the same issue

First Try close Visual Studio then delete bin , obj from your project , finally start visual Build and Run

Second Try make sure you build in real device sometimes emulator cause trouble , how you make sure , if build success but deploy stuck many times

like image 114
Mina Fawzy Avatar answered Oct 18 '22 00:10

Mina Fawzy


In my case, after wiping my PC and completely re-installing Windows 10, my build speeds increased by 2x.

Clean builds that used to take 2:20 minutes now only take 1:20 minutes, and incremental builds that used to take 40 seconds now only take 17 seconds.

Doing an incremental build + deploying to device used to take around 4 minutes. Now it takes only 55 seconds!

I'm not sure what was leading to this awful experience, but I'm glad it's not so terrible anymore (still slow though).

like image 1
Andrew Leader Avatar answered Oct 17 '22 22:10

Andrew Leader


Go to your *.Android project => "Properties" => "Android Options" and set the following options:

  • Dex compiler: dx
  • Linking: None

This gives me a fast build speed

like image 1
Luca Ziegler Avatar answered Oct 17 '22 23:10

Luca Ziegler