What causes, "Index was out of range. Must be non-negative and less than the size of the collection" when using StarTeam Integration for Visual Studio?
The error may occur when using the "Place Project" option in the Visual Studio Integration.
The Stack Trace generated will be similar to:
at System.Collections.ArrayList.RemoveAt(Int32 index)
at Borland.StarTeam.VSIP.VSOperations.PlaceProject(Project vsProject)
at Borland.StarTeam.VSIP.BorlandStarTeamPackage.Exec(Guid& guidCmdGroup, UInt32 cmdID, UInt32 nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
This is a defect that has arisen when a particular call is is made by any program that uses the .NET framework"s "ArrayList" class and calls the "RemoveAt" method for an invalid element.
A possible workaround is to repeat the operation and ignore the error - eventually this should place the Visual Studio project into StarTeam. Borland StarTeam Engineering plan to address this limitation in a future release of the integration.