MZ-Tools Articles Series: BUG: ProjectItem.Collection returns a wrong collection for folders of SQL Projects of Visual Studio Team Edition for Database Professionals

While adding support for SQL Server database projects of VS Team Edition for Database Professionals in my MZ-Tools add-in, I found a nasty bug in the implementation of the ProjectItem.Collection property when the item is a folder:

BUG: ProjectItem.Collection returns a wrong collection for folders of SQL Projects of Visual Studio Team Edition for Database Professionals
http://www.mztools.com/articles/2007/MZ2007031.aspx

I reported it to Microsoft through Microsoft Connect but they closed it without even acknowledging the bug:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=295434

I used Reflector for .NET to examine the internals of the package and I discovered the code that is wrong, so I opened a new one with a more detailed explanation:

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296758

Fortunately once you know the internals of the class that is wrong you can use Reflection to make the correct calls and get the expected result, so the next build of MZ-Tools will support database projects, but I hate when I spend time reporting a bug that will not be fixed or even acknowledged. BTW, they introduced a new bug in VS 2008 that did not exist in VS 2005:

EditPoint.FindPattern causes InvalidCastException on SQL editor of VSTS for DB Professional projects
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=295427

I wish they fix that one…