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.
I followed the documentation to add implicit styles from code to my App.cs in PCL project.
if (Current.Resources == null)
Current.Resources = new ResourceDictionary();
BaseResourceKey = Device.Styles.BodyStyleKey,
Property = Label.TextColorProperty,
Value = Color.White
Trying to run this on either Windows Phone or Android gives the exception
"System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at [...] Xamarin.Forms.Element.OnResourcesChanged(Object sender, ResourcesChangedEventArgs e) at Xamarin.Forms.MergedResourceDictionary..."
Question on Stack Overflow:
I have checked this issue with the help of code given in bug with Xamarin.Forms 188.8.131.5296 and able to reproduce this issue at my end.
Screencast with Xamarin.Forms 184.108.40.20696 : http://www.screencast.com/t/VQZuiZyPevtw
I have also checked this issue with Xamarin.Forms.220.127.116.1109-pre2 and this is working fine.
Screencast with Xamarin.Forms 18.104.22.16809-pre2 : http://www.screencast.com/t/eAjfy0DG
Could you please check this with Xamarin.Forms 22.214.171.12409-pre2 and let us know if you are still getting this issue along with Zip Xamarin Logs, Application output and exception log.
Environment Info :
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Xamarin 3.9.291.0 (9f3e552)
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.
For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d