CA0001 errors in TFS 2012 when executing builds - by SWarnberg

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 771950 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 11/22/2012 6:58:53 AM
Access Restriction Public


After upgrading to TFS2012, we get the above Code Analysis error when executing builds. This happens from time-to-time, not always.
This was a known problem in TFS2008 because of a multi-threading issue in Static Code Analysis. It was, however, fixed in TFS2010, but now it seems to have been reinvented again in TFS 2012.

CA0001 : Rule=Microsoft.Performance#CA1811, Target={XXX}.#SerializeObjects(System.Collections.Generic.List`1<System.Object>) : Collection was modified; enumeration operation may not execute.
Sign in to post a comment.
Posted by Scott Parillo - kCura on 3/25/2015 at 9:19 AM
This issue should be re-opened because this has been a continuous issue for our team . We run TFS 2013 + Update 4 and the build agent is on a Windows 7 and VS 2013 + Update 4 workstation.

We never see this issue when running CA via VS as it seems to be a TFS only issue. We get roughly 5 failed builds per week due to this problem and would estimate something like 50 builds per week.

Is there any kind of verbose/diagnostics log we can send to help sort this out?
Posted by Microsoft on 4/11/2013 at 6:39 PM
As we're still unable to reproduce this Code Analysis issue ourselves, I'm going to resolve this as Not Repro for now. If you can submit a zipped project that demonstrates this issue occurring, please do reactivate the bug so we can take a look.

Thanks again!

Alex Turner
Senior Program Manager
Visual Basic and C# Compiler
Posted by Microsoft on 3/12/2013 at 5:01 PM
Thanks for reporting this issue you've encountered with Visual Studio!

We've attempted to reproduce this build race condition ourselves, but have so far been unable to see it happen. We'll need you to attach a small demo project that shows this issue occurring. Once we have such a project, we can continue investigating this bug.

Thanks again!

Alex Turner
Senior Program Manager
Visual Basic and C# Compiler
Posted by Microsoft on 11/22/2012 at 6:44 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 11/22/2012 at 7:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(