EnvDTE.UIHierarchyItems does not work correctly in Visual Studio 2005 if Solution Explorer nodes are not opened previously - by Carlos J. Quintero

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 269526 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 4/9/2007 3:26:05 AM
Access Restriction Public


When using a macro or add-in in VS 2005 to iterate the nodes of the Solution Explorer, some nodes inside solution folders are not returned if you didn't expand them previously by hand.
Sign in to post a comment.
Posted by Przemysław Włodarczak on 1/21/2008 at 7:18 AM
+1 for this as bug. This issue causes serious problems when developing VS addins. If this is by design, then this design is flawed and should be really reconsidered.
Posted by Dmitry Shaporenkov on 12/12/2007 at 6:40 AM
Actually I submitted (or was going to submit) a similar issue by myself, and I'm very surprised to learn that this behavior is considered 'by design'. What happens is that a specific API (UIHierarchyItems) Visual Studio exposes simply doesn't work as one can reasonably expect it to. Is it by design? If it is, please reconsider this design. For whatever reason it works the current way, any 'normal' external user / extender will think this is a BUG.
Posted by CleverCoder on 10/8/2007 at 12:30 PM
By design? Do they realize that the Expanded = true doesn't WORK!? I can't wait for this to be fixed. IT IS A BUG!
Posted by Carlos J. Quintero on 4/17/2007 at 11:36 AM
You could try to implement a fix this way:

- For each node, use a flag that indicates if the children nodes have been retrieved or not.
- When the user expands a node, change the flag.
- When the nodes are iterated recursively, if the flag indicates that the children nodes were not retrieved previously, then retrieve them (without expanding the node!).

I know that the current behavior is by design, but it is a bad design, a lazy one, it did not happen in previous VS versions and it does not help at all, it causes problems in addins...
Posted by Microsoft on 4/17/2007 at 10:57 AM
Thanks for reporting this issue. This is actually By Design since the hierarchy doesn't know about the children until the nodes are explicitly expanded.


The Visual Studio IDE Team
Posted by Microsoft on 4/9/2007 at 6:24 PM
Thanks for your feedback. We have reproduced this bug on Visual Studio 2005 SP1, 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 4/9/2007 at 6:03 AM
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