Lets you specify when Solution Explorer syncs to the current item.
Adds 3 buttons to solution explorer: Select current item, Collapse all, Collapse all except current item
I use this extension more then any other extension. There are other extensions that do something similar but they have dozens of other features I never use. This one has exactly what I want. If you want do not like the "Track Active Item in Solution Explorer" but need a way to find the current class in the Solution Explorer then this is the tool for you. If you need an easy to to collapse projects in the Solution Explorer without installing dozens of other unused features then this is the tool for you.
Love this tool. Having developed on Eclipse for several years, I was used to having a tool to "Sync" the editor with Solution Explorer's tree control. I was surprised that Microsoft didn't already have the tool as part of Visual Studio.
I was pleased when I found this extension that performs a similar task. It makes developing noticeably easier.
It used to be a pain to make a specific change to multiple files in one project -- every time I'd close a file, the solution explorer would jump to a different spot from where I needed it to be. Using the "Solution Explorer Tools", I can take control, choosing to highlight the active file in the tree only when I want. The "Collapse All" and "Collapse to Item" features are very useful too.
I wonder if it would be possible to have an "undo last collapse" button, so I can use the "Collapse to Item" feature to see where my active file, then put the tree back to being expanded the way it was.
-- UPDATE: I see you added the undo feature. Exactly what I was looking for. Thanks!
Not exactly. The solution explorer has changed quite a bit in VS2012, and the basic functionality of this extension is already in it (Sync, Collapse).
I do plan on making a different extension which would do a collapse and then sync, which for me is the best part of this extension.
There's some other features that wouldn't make it like the undo, but personally, I never really found that to be useful.
I use this frequently, but just started finding that the buttons no longer appear at the top of the solution explorer. I tried installing it again, but just get a message that it is already installed for all applicable products. How can I uninstall and re-install it? Do you know if there have been any updates to VS2010 that cause this tool to break?
Nevermind - I found that something had disabled the extension under the extension manager. Not sure how that happened since I know for sure I didn't disable it.
Excellent idea, required feature in large solution, however any functionality (sync, collapse) doesn't work for me - always get exception:
---------------------------
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
---------------------------
Windows 7 x64, VS 2010
"Track Active Item in Solution Explorer" is off
Hi, my guess is it's something specific to your solution, would you be able to send me the solution and project files you're experiencing this on (the actual code files won't be needed)?
Hey,
I get the same error in my solution. In my case I have a Azure Cloud Service that is stops collapsing on and then throws that same error.
Hope that helps.
Awesome tool. Love it.
Thanks so much,
Tom
@tomkrueger
My expectation is that Sync Item should only expand the path between the solution root and the item. Instead, it expands all projects located before the project with the item.
The extension doesn't expand every project located before the project.
However, it does have to fight against visual studio a bit. If you use solution folders, under certain conditions, visual studio will expand all projects when they are first opened. This is probably what you're referring to. As such their state before I touch them is "expanded" and I honour that state.
But also note that the extension contains "Collapse to item" this collapses EVERYTHING except the path to the current item.
If you believe that your problem isn't covered by this explanation, please send me a video of the problem (I recommend Jing, very simple) And I'll look into it.
Thanks for the response. Yes, I use solution folders to structure my projects. What do you mean by "expand all projects when they are first opened"? I usually have only one or two solution folders expanded, among them the folder that contains the project in question. When my VS starts, the solution folders are collapsed.
Thanks, the Collapse to Item option works. Better than expected, actually, because after I use it for the first time in a VS instance, Sync to Item also no longer expands all projects but works as it should. Apparently, there is something really strange going on with the proejct state. Maybe what VS shows and what's actually managed in its state are out of sync?
Michael
I just tried it on a solution with a lot of solution folders and there's definitely a bug there, I pretty much always use "collapse and sync" so I never came across it.
Sorry for not testing it earlier.
Hopefully I'll issue a fix soon.
When I click any of the buttons, I get a dialog like this:
---------------------------
Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
---------------------------
I am using vs 2010 RTM.
Hi Ryan,
I've noticed a similar bug in 2.1 which I've issued 2.2 for.
If it doesn't fix it for you it should (hopefully) provide you with a more detailed error message (A stack trace).
If you could give me that new message (or tell me if it's fixed) and I'll get on it quickly.
Thanks,
Chris.
Still broken:
Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL))
at EnvDTE.UIHierarchyItem.get_Name()
at CMcG.SolutionExplorerTools.TreeSerialiser.Serialise(UIHierarchyItem item, String prefix)
at CMcG.SolutionExplorerTools.TreeSerialiser.<>c__DisplayClass4.<Serialise>b__1(UIHierarchyItem x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at CMcG.SolutionExplorerTools.TreeSerialiser.Serialise(UIHierarchyItem item, String prefix)
at CMcG.SolutionExplorerTools.TreeSerialiser.<>c__DisplayClass4.<Serialise>b__1(UIHierarchyItem x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at CMcG.SolutionExplorerTools.TreeSerialiser.Serialise(UIHierarchyItem item, String prefix)
at CMcG.SolutionExplorerTools.TreeSerialiser.<>c__DisplayClass4.<Serialise>b__1(UIHierarchyItem x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at CMcG.SolutionExplorerTools.TreeSerialiser.Serialise(UIHierarchyItem item, String prefix)
at CMcG.SolutionExplorerTools.SolutionExplorer.SyncItem(DTE2 dte, Boolean isUndoable)
Thanks, very similar to the other bug - exact same line just different exception.
It should be fixed in 2.3.
Pretty much the Recording of the state for the undo asked each item for its name. Some items (in the case of the 2.2, if you had an unloaded project the line under that that said "this project is unloaded", not sure what was causing yours) don't have a name and instead throw an exception. Unfortunately I could find no other way to detect it except to catch the exception.
I realy like the "Solution Explorer Tools" Extension.
Unfortunately the default assignment of the shortkey for Project.Collapsetoitem is not very useful, when the keyboard layout is Swiss(German). In this case, the opening square bracket is used. So you can't type a square bracket in the code editor. It tooks a while to identifying the cause.
So perhaps it would be better to not assign a shortcut at all.
Thanks, this is starting to really annoy me now, so hopefully I'll fix it quite soon.
It didn't use to happen, I think in my attempts to remove as many instances of the 'Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))' error (only happens if you have solution folders under certain conditions, I've made it so it rarely happens now) so I don't think it will take me too long.