0

In visual studio, there seems to be no way to collapse all of a project's folders in solution explorer?

Does anyone know how this can be done?

Anyone? This has dogged me for years, i just wish there was a way without macros and addins, like they mention in this similar question Collapse all files at once in Solution Explorer window in Visual Studio

Community
  • 1
  • 1
user681909
  • 31
  • 5
  • I voted to close. This is not a question. Why not make this an answer for the question you point to? Self-answering question is fine, but if you do, ask a real question and add a real answer. – Bart May 19 '12 at 13:12
  • Because the old thread is almost 2 years old. I am used to getting abuse for posting on old threads! – user681909 May 19 '12 at 13:13
  • Welcome to SO. There are no "threads" and this is not a forum. It's a Q&A site. Answering old questions is just fine. If you have something of value to add, go ahead, don't hesitate to do that. – Bart May 19 '12 at 13:15
  • I just reread what you said! It is a real question, and i have provided a real answer, to a real problem. Really i have! – user681909 May 19 '12 at 13:15
  • Let me clarify, since you're new here. Yes, you have asked a question. And yes, you have provided an answer. But this is a Q&A site with a fixed structure. If you would have posted only your question first and then in the answer section you would have added your answer, that would have been just fine. The question itself should not already contain the answer. Separate the two. But in this particular case, add your answer to the existing question. If not, this question might even be closed as a duplicate. All just FYI. This site might take some getting used to. Good luck. ;) – Bart May 19 '12 at 13:17
  • Ahhhhhhhh! I see what you mean. There's that little section at the bottom where it says answers! Sorry. I will reformat it appropriately. – user681909 May 19 '12 at 13:20
  • @Bart - I can't add an answer to my own question for 8 hours! – user681909 May 19 '12 at 13:26
  • Yes, that's normal. Like I said, you might be better off answering the old question. With your current question you run the risk of it being closed as a duplicate of the one you point to. So to summarize: answer the old question. Delete this one. I think that's the best solution. – Bart May 19 '12 at 13:28
  • Ok. Is 27 minutes per post normal for a rookie?! – user681909 May 19 '12 at 13:37
  • -1? This is the droid you have been looking for. – user681909 May 21 '12 at 10:18
  • See [Visual Studio: Is there a way to collapse all items of Solution Explorer? \- Stack Overflow](https://stackoverflow.com/questions/1357731/visual-studio-is-there-a-way-to-collapse-all-items-of-solution-explorer/24514803#24514803); Sebastian Patten shows that there is an icon for this. – Sam Hobbs Jul 30 '21 at 00:14

2 Answers2

1

Microsoft released a pretty handy extension called CollapseSelection which does just that.

Bart
  • 19,692
  • 7
  • 68
  • 77
t3hn00b
  • 904
  • 5
  • 13
0

Yes you can. Right click the project in solution explorer > Unload. Then reload the project.

An age old problem fixed.

(Original answer by the OP, hidden inside the question. Now a true answer. Community Wiki to prevent unfair rep gain).

Bart
  • 19,692
  • 7
  • 68
  • 77