You are here
Home > Programming > Visual Studio Solution Explorer Tips

Visual Studio Solution Explorer Tips

Visual Studio Solution Explorer
Visual Studio Solution Explorer Tips

The Visual Studio Solution Explorer is the one part of the IDE that I’m betting most developers use so often, it tends to melt away in the background of ‘doing one’s job’. But yet, there it is, an indispensable tool of sheer brilliance waiting to be discovered. There is much more to the Visual Studio Solution Explorer than meets the eye. Let’s take a closer look.

Explore Solution Explorer

So I’m going to dispense with the pleasantries and jump right in. The screen shot below is of a project I’m currently working on. It has 16 projects and isn’t all that huge in the grand scheme of things (Clone CodeContracts from GitHub and see that monster). The Visual Studio Solution Explorer provides a way for developers to focus a bit more on the code you are currently busy with via a context menu item called Scope to This.

Visual Studio Solution Explorer
Visual Studio Solution Explorer

Right click on one of your projects and select the Scope to This menu item. If you haven’t noticed this menu item before, don’t feel alone. I used Visual Studio for years without ‘discovering’ it.

Visual Studio Solution Explorer
Scope To This

The Visual Studio Solution Explorer will then scope itself to only that project you selected earlier. This helps in a way to get rid of the clutter around you while coding. I can almost call it the Shift+Alt+Enter equivalent for the Solution Explorer.

Visual Studio Solution Explorer
Scoped Project

If you want to go back and see all the projects in your solution, simply click on the Back button in the Visual Studio Solution Explorer. This is a really neat trick and I’m betting that it will in some way allow you to be more focused on your current development task at hand.

Visual Studio Solution Explorer
Navigate Back To Solution

Another great tip is the filters button. Currently there are two filters that you can choose from. The Pending Changes Filter and the Open Files Filter.

Visual Studio Solution Explorer
Solution Explorer Filters

If you clicked on the Pending Changes Filter you will see that the Solution Explorer filters out everything but the files in your solution that have pending changes. This is really nice when you want to compare files that are projects apart perhaps.

Visual Studio Solution Explorer
Pending Changes Filter

The second filter will only show you those files that are currently open in your IDE. Perfect for when you have to make changes or even when you need to stay focused on specific files only.

Visual Studio Solution Explorer
Open Files Filter
I Can Read Your Mind

So if I’m right, you might be wondering at this point in time if you can create your own custom filters for the Visual Studio Solution Explorer. The answer is yes, you can. This is somewhat beyond the scope of this article, but head on over to the following article: Extending the Solution Explorer Filter

Definitely something nice and fun to play around with. Happy programming!

Dirk Strauss
Dirk is a Software Developer and Microsoft MVP from South Africa. He loves all things Technology and is slightly addicted to Twitter and Jimi Hendrix. Apart from writing code, he also enjoys writing human readable articles. "I love sharing knowledge and connecting with people from around the world. It's the diversity that makes life so beautiful." Dirk feels very strongly that pizza is simply not complete without Tabasco, that you can never have too much garlic, and that cooking the perfect steak is an art he has yet to master.

Similar Articles

Top