Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 57791 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 23136 [details]
When I do a build for iOS Simulator the main app build takes about 16 seconds:
Time Elapsed 00:00:16.62
When I do a device build the main app build takes about 10 minutes:
Time Elapsed 00:10:02.74
I have tried using xbuild and msbuild and have gotten the same results.
Created attachment 23137 [details]
Simulator build log
Created attachment 23138 [details]
Device Build Log
This is expected behavior since compiling for device requires AOTing the binaries whereas compiling for Simulator does not.
You might also be targetting multiple architectures (ARMv7 and ARM64, for examples) which also slows things down.
For simulator, you typically only build for either i386 or x86_64 and simulator builds can run .NET code w/o needing to compile to native, so lots of corners are cut for the sake of improving build times that are just not possible for device.
Yea, but 16 seconds vs. over 10 minutes? 10 minute builds are not a workable situation. Enable device-specific builds is enabled for debug iPhone builds.
BTW...this is a new issue. Builds did not used to take this long.
Reopened. Builds should not take 10 minutes.
@tmrog thanks for the logs, someone will look over them to see where time is spent and if some different options can help reduce build time.
Do you recall which older version was faster ?
Is it possible, if needed, to share your project with us to get a more accurate profile? If not then we might ask a few more questions to get more data later.
I first entered this bug here which has more information about when I first saw it:
I will check to see with my client whether I can provide the project privately to you.
It will take some time to get approval to provide the project to you. Before we go that way, I would like to provide you with whatever help you need to get to the bottom of this.
Please let me know what you need.
Sitting here waiting for my iOS build, so thought I'd check with you to see whether there is some logging or something I can enable to get more information.
Are you able to get approval for us to get a copy of the project to reproduce the build times locally?
If you need to get an NDA we can provide that too.
No, I will try again but I don't have much hope that they will allow me to provide the code but I will mention the NDA.
I was hoping we could proceed with "If not then we might ask a few more questions to get more data later."
Also, I have been working on a UWP app for the same project for the last couple months so I need to circle back around and time some builds with latest version of VS for MAC now that I am back working on iOS.
That would be excellent if you could revisit that project and collect the diagnostic logs again to share with the latest versions.
Please include your full build logs and all version information.
To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run
On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.
Easiest way to get exact version information:
- On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
Then copy/paste the version information (you can use the "Copy Information" button).
Here are numbers with the latest stable VS MAC.
4:00 - rebuild entire solution
3:30 - reubild main iOS project
1:45 - make single file change in main iOS project
0:30 - rebuild entire solution for simulator
These are clearly better than the +10 minute builds I was seeing before. The question I have is whether these seem reasonable to you guys. Still seems slow to me but I also don't understand what all the differences are building for a device vs. a simulator.
Also, wondering why the actool warnings keep popping up.
I have attached the build log for the rebuild entire solution case and version info.
Created attachment 24955 [details]
VS MAC Info
Created attachment 24956 [details]
Build log for rebuild solution
I apologize for the delay. These build times do seem _reasonable_ to me given the complexity shown of the projects in the build log and the build settings chosen. However, it would be great to get the opinion of someone from the engineering team so I will ask for that too.
There is good information in this guide on the build mechanics and tips and tricks for both simulator and device builds that might help answer you questions too: https://developer.xamarin.com/guides/ios/advanced_topics/ios-build-mechanics/
Confirming so we can get an engineer to look at it