Léon
Léon

Reputation: 286

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?

Upvotes: 22

Views: 12535

Answers (3)

Luca Ziegler
Luca Ziegler

Reputation: 4134

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

Upvotes: 1

Andrew Leader
Andrew Leader

Reputation: 985

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).

Upvotes: 1

Mina Fawzy
Mina Fawzy

Reputation: 21452

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

Upvotes: 8

Related Questions