Lately I’ve been speaking at local user groups about many of the exciting new features in Visual Studio 2012. Since there is so much to know and learn about VS 2012, I decided to create a collection of blog posts with many of the tips. This collection of posts will include features that are new to VS 2012 as well as some existing features as well. To view all of the VS 2012 tips posted so far, click here.

Some very useful filters in Solution Explorer

imageAmong many other great enhancements in VS 2012, the team really did a lot of work on the Solution Explorer. Is is packed full of goodies. Many of the new features in VS 2012 are designed to “get visual studio out of your way”. This feature is one example of how the VS team does just that. In complicated projects, the solution explorer can be a pretty crowded place. In the past, it was not always easy to find what you were looking for. Now, VS 2012 introduces filtering in the Solution Explorer. Today I’ll demo two options:

  • Pending Changes Filter
  • Open Files Filter

Pending Changes Filter

Often when I am working in VS, I want to know what files I have changed. And often, I continue to work in a bunch of files, going back and forth between them. Now, I can use the pending changes filter to tell Solution Explorer to only show the files that I have changed already! Easy, right? This feature is tied in with your source control system to figure out which files have changed.

Open Files Filter

Just like I said above, sometimes, the Solution Explorer can just be too crowded. One way I can filter it is to use the Open Files Filter. This is an example where the name pretty much gives away the ending. There isn’t much to say about this. It simply filters the Solution Explorer to only show the files I have open in the editor tabs.

In this example, I am choosing the Open Files Filter: image

In the screen shot below, you can see that after applying the filter, only two files are displayed in Sln Explorer. They are the two open files: HomeController.cs and AccountController.cs

image

 

I hope you find this tip helpful. To see more VS 2012 Tips, just click here.

4 thoughts on “Visual Studio 2012 Tip: Solution Explorer Filters

  1. I have a question about the pending changes filter. You say “This feature is tied in with your source control system to figure out which files have changed.” I have implemented my own source control provider, how can I tie it up with the pending changes filter action?

    Reply
    • Got the answer from Microsoft: “For that you have to implement IVsSccManager2.GetSccGlyph and check for “rgdwSccStatus” of the file for __SccStatus.SCC_STATUS_CHECKEDOUT to determine what is included with the filter.”

      Reply
  2. Pingback: Dew Drop – January 14, 2013 (#1,479) | Alvin Ashcraft's Morning Dew

Leave a reply

required

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>