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 on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 17280 [details]
I experience very slow build on some of my iOS apps/projects - not all.
I have attached a build log with diagnostic verbosity.
It seems that MSBuild and GetCopyToOutputDirectoryItems tasks are the slow ones. I don't have a clue why this is happening.
I haven't experienced this with Xamarin Studio 5.x, but of course I have updated other components (Xamarin.iOS) as well.
It looks like GetCopyToOutputDirectoryItems calls MSBuild. The MSBuild task is for building project references.
It looks like your biggest source of time is actually nuget restore. That takes up an order of magnitude more time than anything else.
I mainly experience this problem when using some projects of a large solution - https://github.com/XLabs/Xamarin-Forms-Labs - in another solution. Building just XLabs is far quicker. All Nuget packages are present, there should be no need to restore them. As a workaround I'm currently using XLabs as Nuget package and not source.
Additionally on my Windows machine building for Android in the same configuration is working fine without performance problems.
Now it seems the same problem occurs when only building Xamarin-Forms-Labs on my Mac. I don't have a clue how it's getting worse day by day. Or better for reproducing this issue easier :)
Open XLabs.sln and try to build samples/XLabs.Samples.iOS project! I don't see any message regarding package restore. It seems the build time is increasing from project to project as the whole build is going forward.
One more notice: Building from VS2015 connected to Mac build host this whole issue does not arise (others do however :)), and simply building from command line on the Mac with msbuild or xbuild is very fast.
Created attachment 17367 [details]
Build log of XLabs.Sample.iOS project
New info: It seems using https://www.nuget.org/packages/NuSpec.ReferenceGenerator/2.0.0-beta-bld14 package slows down the iOS build on Mac. Android build on Windows using XS is not affected. VS2015 build is not affected also, but debugging from VS is - it stands a couple of minutes on "Start debugging Android application..." before can debugger attaches.
I still experience quite a slow build on one iOS project, but this is not as serious as this was.
We deprecated xbuild and recommend using msbuild instead. Switching to msbuild will also most likely resolve the issue you reported.