Answered Collection was modified; enumeration operation may not execute

  • Wednesday, April 25, 2012 7:20 AM
     
     

    Hello,

    When I import a 2 WI (task and bug) to 3 TFSprojects, to open their Portals I appeared once in each message: "Collection was modified; enumeration operation may not execute ", but both projects have not yet TFS source code.
    Is it amajor mistake or I can work with the new template without future problems?

    Thanks!

All Replies

  • Wednesday, April 25, 2012 9:11 AM
     
     

    I have trouble understandign the problem you're encountering. Could you describe the exact steps you've taken. What the end goal is and what isn't working as planned?

    If you've used custom code, can you share the part which is throwing the exception?


    My blog: blog.jessehouwing.nl


  • Wednesday, April 25, 2012 9:39 AM
     
     

    I'm customizing a template TFS with new fields. And I created a new TFS project to test it before applying it to real projects. And what was my surprise when I open the Dashboard / Panel Web of this Project appeared to me (only the first time I opened) the message "Collection was modified; enumeration operation may not execute ".
    And I readed in other forum queries that this error only happens in the source code and the strange thing is that my TFS project still is not associated with any source code.

    I repeat this to another new project and appeared the same message only the first time.

    Thank you for your time spent!

  • Wednesday, April 25, 2012 11:16 AM
     
     
    What fields did you alter and how did you alter them. The error happens in the code of the dashboard, not in the code which is checked into TFS (which you obviously haven't done yet). So it looks like you made changes to the template that break the dashboards.

    My blog: blog.jessehouwing.nl

  • Wednesday, April 25, 2012 11:59 AM
     
     

    Hi Jesse!

    The systems department installed the Spanish version of TFS 2010.

    The company that was contracted to implement TFS installed a customized version of the CMMI template in English.

    Now I'm updating that template with new fields and eliminating others. And I find messages like "Error Importing work item type definition: TF26177: Can not change the field name Microsoft.VSTS.Scheduling.CompletedWork from 'Completed Work' to 'Tiempo Completado'"

    So I had to use the Process Editor to rename those fields from Spanish to English (Completed Work and Remaining Wok). And now I can then import the new project TFS but when I open the Dashboard displays only the first time the error message "Collection was modified, enumeration operation may not execute". But the DashBoard seems to work well.

    Thank you so much!


    • Edited by RafaGen Wednesday, April 25, 2012 12:01 PM
    •  
  • Wednesday, April 25, 2012 12:32 PM
     
     

    Did you already put your work items into the template, or is it still empty?

    If the latter, I'd just remove all work item definitions and re-import the English ones.

    If the first, I haven't tried to do in place translation of process templates, but since there are a lot of both database links, report links and other fields referencing the actual textual values in the process template definition, just translating the labels might not be enough. I'd much rather take the path of creating a new project and migrating any workitems you already have.


    My blog: blog.jessehouwing.nl

  • Thursday, April 26, 2012 6:13 AM
    Moderator
     
     

    Hi RafaGen,

    Thank you for your post.

    According to your description of the issue, seems you customized team project template by editing some WITs, but when go to team portal experience "Collection was modified; enumeration operation may not execute". If I have misunderstood anything, please free feel to let me know.

    If you download process template, then edit the WIT, please remember to upload it to server.

    After save the template rightly, and create new team project properly, please try to restart the SharePoint after you edit the WIT, in web access, you can click "Refresh Cache".

    If the issue still exists, would you please check is there any event log relate to this issue?

    Best regards,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked As Answer by RafaGen Thursday, April 26, 2012 10:14 AM
    • Unmarked As Answer by RafaGen Friday, April 27, 2012 6:15 AM
    •  
  • Thursday, April 26, 2012 10:16 AM
     
     

    Hi Lily

    I tried to upload the new template (with WI imported to new projects) to the server and created a new project with an old template to import the new WI and everything has worked perfect! :)

    Thank you very much. Great work and excellent support!

    Best regards!

    Rafa.

  • Thursday, April 26, 2012 10:19 AM
     
     

    Hi Jesse

    thank you so much for the time you have dedicated to me!

    I've solved the problem!

    Rafa.

  • Friday, April 27, 2012 6:22 AM
     
     

    Yesterday I spoke too fast.
    This morning to try again to open the project DashBoard has appeared to me the error message unfortunately.
    You can see the snapshot I remember the message appears only once. If I refresh the screen no longer occurs most often.
    Any other suggestions?

    The message translated to English says: "Collection was modified; enumeration operation may not execute ".

    Thanks!


    • Edited by RafaGen Friday, April 27, 2012 6:23 AM
    •  
  • Friday, April 27, 2012 6:58 AM
    Moderator
     
     

    Hi RafaGen,

    Have you tried to restart the SharePoint after you edit the WIT? In web access, you can click "Refresh Cache".

    Thanks,


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, April 27, 2012 7:50 AM
     
     

    Hi Lily

    Yes, I did it.

    Thank you!

  • Monday, April 30, 2012 6:23 AM
    Moderator
     
     Answered

    Hi,

    Would you create a connect report for this issue? Product team will evaluate the issue carefully.  To get better response, exact reproduce steps and your environment information are required. Like Spanish TFS 2010, CMMI team project etc.

    https://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx You can get email notification when there's update to connect issue.

    thanks and best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager

  • Monday, April 30, 2012 10:58 AM
     
     

    Hi Forrest

    I'll try this option!

    Thank you so much!


    • Edited by RafaGen Monday, April 30, 2012 10:59 AM
    •  
  • Wednesday, May 02, 2012 1:42 AM
    Moderator
     
     

    Hi,

    If you can post link once you reported the issue, that would be great.

    best regards,


    Forrest Guo | MSDN Community Support | Feedback to manager