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
Developer Community or GitHub 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 13193 [details]
Originally raised on the forum by Andrew Arnott:
When installing a NuGet package to a new Xamarin.Android project, VS hung for several minutes. I broke into VS with the debugger and found via the callstack (attached) that the hang is caused by the NuGet package manager enumerating references, causing the C# project system to request a synchronous design-time build on the UI thread, leading to MSBuild running a Xamarin.Android task. The Xamarin.Android task downloads many megabytes of data from the Internet. This seems very inappropriate for a design-time build, which is supposed to run in under 200ms. Please adjust your Xamarin.Android MSBuild targets to skip expensive tasks like this during design-time builds!
I'm able to reproduce this on the current stable as well as active Cycle 6 builds. I'm not entirely sure how much of an impact clearing the NuGet/Xamarin package caches has on this, however attempting to add GooglePlayServices - All from a clean state is certainly quite painful.
Steps to reproduce:
1. Delete the following cache locations if they exist:
2. Create a new hello world android template
3. Right click on the project/solution -> Manage NuGet Packages...
4. Search for "Google Play Services All", select and install that option once it appears.
With this workflow, you can see VS free up _briefly_ in between package additions. However if you're attempting to add 5+ packages or so (quite noticeable when adding all of the google play services packages), this results in a few minutes of unresponsiveness.
Fixed in monodroid/master/39ee3143
We added support for DesignTimeBuild property. The VS team also needed to add support for passing that property as part of the UpdateAndroidResources call.
*** Bug 35797 has been marked as a duplicate of this bug. ***
This is verified fixed against xamarinvs/cycle6/860fe435 (monodroid/cycle6/3efa14c)