Search

ProjectItem.Collection.Parent does not return the parent in VSTS Database Projects by MVP CarlosQ

Closed
as Fixed Help for as Fixed

0
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 295434
Opened: 8/28/2007 4:47:23 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When you navigate from bottom to top the ProjectItems hierarchy of a SQL Server database project, ProjectItem.Collection.Parent returns the ProjectItem itself again instead of its parent.
Details (expand)
Product Language
English

Version

Visual Studio 2005 (All Products and Editions) Service Pack 1
Operating System
Windows XP Professional
Operating System Language
English
Steps to Reproduce
- Open VS 2008 Beta2 and click the File, New Project menu
- Select "Database Projects" type and then the "SQL Server 2005" project template. This creates a project which has, among other things, a "Scripts", "Post-Deployment" folder with a "DatabaseObjectOptions.sql" file

- Create and run this macro:

Sub f1()

Dim objProjectItem As ProjectItem
Dim objParent As Object

objProjectItem = DTE.Solution.FindProjectItem("DatabaseObjectOptions.sql")

objParent = objProjectItem.Collection.Parent
objProjectItem = CType(objParent, ProjectItem)
MsgBox(objProjectItem.Name)

objParent = objProjectItem.Collection.Parent
objProjectItem = CType(objParent, ProjectItem)
MsgBox(objProjectItem.Name)

End Sub

Actual Results
The second MsgBox returns objProjectItem.Name = "Post-Deployment" like the first MsgBox.
Expected Results
It should return "Scripts", which is the parent folder. This works fine for VB.NET/C# projects but it seems that the implementation of the automation model for database projects has this bug which ruins add-ins.
TAP Code (if applicable)
 
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 8/28/2007 at 5:53 PM
Thank you for your feedback. We are currently investigating. If this issue is urgent, please call support directly (see http://support.microsoft.com).

Thank you,
Visual Studio Product Team
Posted by Microsoft on 8/28/2007 at 7:18 PM
Thanks for your feedback. We have reproduced this bug on Visual Studio 2008 Beta 2, and we are sending this bug to the appropriate group within the VisualStudio Product Team for triage and resolution.

Thank you,
Visual Studio Product Team.
Posted by Microsoft on 8/29/2007 at 9:41 AM
We are currently designing our supported scenarios for DTE in our next version. The sample you sent is helpful to us in understanding what our customers really want to be able to accomplish through DTE. Any additional DTE scenarios that are critical to you would be most helpful to us in our planning. If you have additional input, please feel free to mail me directly, Jeff.Welton@Microsoft.com


Thanks again for helping us to better understand our customers' needs