Context menu for work item returns "Index was outside the bounds" error
Hi,
In one of my team project, the "Add Work Item" menu item is giving me an error; it expands to "Error loading menu: Index was outside the bounds of the array" instead to a list of work item types.
Anybody have any idea what might be causing this error? Or where to get more information on this error?
Here are some additional information that might be useful:
- It is only happening in this one team project. Other team project are working properly
- This team project had been deleted and "recreated" (i.e. create with same project name). The original team project was using the MSF Agile template and the new one uses the MSF CMMI template.
- Nobody else in this team project is having this problem.
- I had done some work item type customization on the "previous instance" of this project (i.e. on the team project that was deleted).
Thanks
[988 byte] By [
ChiTan] at [2007-12-26]
This is most likely because of registry key issues with our UI components. We thought we fixed it but looks like it still happens in some circumstances. To fix it, delete the entire HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\WorkItemTracking\TeamMenu key in registry. In case you get specific steps to repro the problem pls let us know for us to investigate.Thanks.
Naren,
I had this issue on Friday as well, here is the scenario I believe caused it to occur for us:
- Project was created from Machine A
- Machine B added the project to Team Explorer
- Project was deleted using tfsdeleteproject /force from Machine A
- Project was re-created with the same name from Machine A
- Machine B tries to access the project
The problem still occurred after the project was removed, re-added, restarts, etc. on Machine B.
Regards,
William Bartholomew
Thanks for the steps William. I'll try these steps to repro. Are you able to get unblocked by fixing the registry and move on?
Thanks.
Naren,
Yes, the registry fix has worked on both the computers that have been affected.
Regards,
William Bartholomew
Naren,
The registry fix has also corrected my problem.
Thank you
We also saw this work item menu error under the EXACT same circumstances that William B. outlined: create the project, delete it, recreate with same name-- bam.
Thanks for posting the fix!
I also run into this issue. Thanks for your reply first. From it I think I get the repro steps for this bug.
In fact, I guess the reason of this issue is the client registry doesn't clean up after something has changed. For example:
1. Create a team project named ProjectA with template A and you connect to and work on it, create work items
2. Then delete the project. And change the template by remove a work item type and add another one with different name
3. Re-create the team project named ProjectA
The issue should occur. If occurs, this prove when delete the team project, registy cache isn't cleaned up. If it doesn't occurs, you can delete the project on anthere client so that the registry key isn't cleaned up.
I have the same problem and this is what I did:
- I created a Team Project "ProjectA" using the MSF for Agile Software Development process template
- Migrated a Visual SourceSafe project to Team Foundation Source Control
- I then deleted the Team Project "ProjectA"
- Next I installed Scrum for Team System on the Team Foundation Server and the Scrum Client Utilities on my machine
- I then created the project "ProjectA" again but this time using the Scrum Process Template
- When I right-click Work Items and open the "Add Work Item" menu I see: "error loading menu: index was outside the bounds of the array"
I will try the registry fix but for now I need to document this and the steps to fix this accompanied with screenshots. I will keep you guys posted on whether or not the registry fix helped me.
I also encountered this issue.
Here's what we've seen to reproduce this error.
Production TFS Server A
Test TFS Server B
Two projects, both with the same name.
We created a new work item type, and installed it on both server A & B.
We had to rebuild server B.
When we went to connect to the newly rebuilt server, we were getting the error.
I can only attribute this to the fact that the new server hadn't had the new work item loaded to it, and both projects were the same name.
Hope this helps.