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 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.
When running a command line build to generate an iOS package, the following error randomly fails the build:
2016-11-11T20:37:39.1261271Z Connecting to Mac server XXXXX.local...
2016-11-11T20:37:39.1573776Z Starting connection to Mac XXXXX.local...
2016-11-11T20:37:41.5480019Z Starting Broker 126.96.36.1995 in port 59827...
2016-11-11T20:37:42.2511245Z Uploading 'app.plist' (1/1 KB) 100.00%...
2016-11-11T20:37:45.0636277Z Connection successfully established with the Mac XXXXX.local:59827
2016-11-11T20:37:45.1266892Z ##[error]C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(63,5): Error : Collection was modified; enumeration operation may not execute.
2016-11-11T20:37:45.1266892Z 3>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(63,5): error : Collection was modified; enumeration operation may not execute.
I do not have a stack trace yet, I'll post it when I'll get it.
Moving to future release by now, at least until we can make more research and get more information about the issue.
If I were to guess, I'd say that it is related to parallel builds in a solution, caused by the fact that iOS "Hello" targets are executed in android builds, for some reason.
I see this happening in a solution that has both android and iOS library and executables.
Thanks Jerome. Could you provide the exact command line that you are using to build the solution and get the repro?
Also many fixes around iOS builds, specially around the connection handling to the Mac, has been made so that could fix this issue. I would like to test those changes as much similar as possible to your case, so I can see if it's still reproducible.
Thanks Mauro, it's actually ran from a msbuild target which is inside a msbuild project file, which is itself ran from a VSO agent task.
The failing target in question looks like this:
Thanks Jerome. Although I couldn't get a repro on my machine, I introduced many changes and fixes around iOS build process, specially related to Mac Connection handling. These changes will be available from Xamarin cycle10 release.
Marking the bug as Resolved and assigning to QA for testing for cycle10. This should be tested on master branch from commit 24c2eb75f5956179d09c7a3fb9baf9579bd8255e
This specific issue is still present using Xamarin for VS 188.8.131.526.
Here's the new log:
2017-07-20T07:01:04.3681507Z Connecting to Mac server my-server.local...
2017-07-20T07:01:04.4306534Z Starting connection to Mac my-server.local...
2017-07-20T07:01:10.9305703Z Starting Broker 184.108.40.2066 in port 59549...
2017-07-20T07:01:15.9304982Z Connection successfully established with the Mac my-server.local:59549
2017-07-20T07:01:16.0867450Z ##[error]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Windows.After.targets(63,5): Error : Collection was modified; enumeration operation may not execute.