Visual Studio 2012 New Features: Solution Explorer

Tips Search

Visual Studio 2012 New Features: Solution Explorer

  • Comments 11

I love the title of this one because I’m sure someone will read this and wonder why I think Solution Explorer is a “new” feature.  I mean, haven’t we had this sucker for a billion years?  Aren’t there cave drawings in France about this feature?  So why is it “new”?  Let me show you!

 

Search Solution Explorer (CTRL + ;)

First and foremost, you can now search Solution Explorer!  I’ve been wanting a feature like this since before Solution Explorer was even invented back in my VB 3 days (about 19 years ago).  Here is what things looked like back then:

image

 

And from then until Visual Studio 2010 we STILL couldn’t search items:

image

 

But now you can!  Just type in any search term into the Search Solution Explorer textbox:

image

 

And it will find anything that contains the search term in it:

image

 

You can filter the search to choose how broad the search goes by clicking on the drop down arrow to the far right of the Search Solution Explorer textbox:

(NOTE: searching within file contents doesn’t mean what you think it means.  See the section “More Than Physical” for information)

image

 

One other cool feature is you can have Solution Explorer only show you the currently open files by clicking the drop down button just to the right of the Home button:

image

 

 

More Than Physical

In the past, Solution Explorer was relegated to only showing physical elements or those things that help contain / organize those elements (i.e. solution folders).  That’s out the window, too.  Now the experience doesn’t stop at the physical level but extends to logical elements as well:

image

 

Which makes searching even more awesome:

image

 

If you are using the Preview Tab then clicking on any item in Solution Explorer will go to the file and highlight code if applicable BUT you can’t double click the logical item to open the file for some reason and instead have to double click the filename to open it.

 

 

Navigation

Navigation is much improved as well. 

 

Browser-Like Movement

After a doing a search, like the one shown above, you can click the Home button:

image

 

And Solution Explorer will go back to “normal”:

image

 

Clicking the Back button:

image

 

Takes me back to the search I just did:

image

 

Here is the weird part:  If I reuse the search box and type another search right away it doesn’t remember the previous search I did and I can’t go back; BUT if I click Home between searches then it remembers all my old searches.  I’ve tested this up to 12 entries and it works fine as long as you remember to click Home between searches.

 

Sync with Active Document

Occasionally you may be looking at a file but Solution Explorer isn’t on that file.  When this happens a button appears that allows you to sync Solution Explorer with the document you are currently in so you can see where it is in the project structure.

image

 

Right Click Experience

The right click experience is, to say the least, incredible!  Depending on what you select the context menu changes appropriately.  So if I right click a code file this is what I get:

image

 

But if I right click a class this is what I get:

image

 

And this is the context menu for a method:

image

 

Each option changes the view in Solution Explorer to better examine relationships.  The bottom line:  make sure to check out your context menus to change the elements you are viewing in Solution Explorer.

 

 

New Solution Explorer View

There used to be a button for creating a new instance of Solution Explorer which was excellent for multi-monitor viewing of code:

image

 

The button is gone now (which is a mistake in my opinion) and you can no longer get an entire copy of Solution Explorer in a new window BUT you can get a copy of any project or file in a new Solution Explorer window which is what I have done in the example above.  Just right click any project/file and choose New Solution Explorer View:

image

 

 

Team Foundation Server

If you are using TFS then you can filter Solution Explorer to show you files with Pending Changes:

image

 

And there you have it!  As you can see there are quite a few changes in the new, improved Solution Explorer so go explore!

  • Excellent article with many "big" ( in size + 1 for you ) screenshots making easier to understand what you are writing ( english is not a mother tongue... )..I have apprecaited especially the part about the Navigation part  which introduced great improvements.

    Many thanks to have accepted to lose time to share all these valuable informations.explained in a so simple and clear way

  • Hey Papy :)

    Glad you like the article :)

    Z

  • woot!

    Actually I wanted to blog about this but I think your summary comes close to what I wished to state.

    When I checked out VS2012 for the first time, that's the first thing I saw and was like .. wow!

  • So coooooooool, i wish my company didn't make me works under Emacs or VIM :-(

  • Good move, it looks like it's the VS2010 SolutionNavigator [1] replacing SolutionExplorer and adding new features. I think sync can be very helpful. What about the multi-document icon next to the refresh button? I hope it's the collapse all feature. This leads me to the next question: What's the purpose of the refresh button?

    [1] blogs.msdn.com/.../solution-navigator-blog-post.aspx

  • And the right click experience, OMG!!!, best experience ever.

  • 'Sync with Active Document' is perhaps one of my most wanted functionality (combined with 'Preview Selected Items' . The constant flipping back in forth in solution explorer drives me nuts.

  • How do I persist multiple Solution Explrer views? I've got a lot of libraries and projects in my solution so I usually open up 2-3 solution explorers and reduce them to a specific scope. I can't get them to persist however.. every time I reopen VS they are just GONE.

    VS 2012 update 3.

  • Where Can I find the meaning of each icon in solucion explorer, currently there are a lot of differents icons.  dónde puedo encontar el significado de cada ícono en el solución explorer?

  • For anyone who has used a Jetbrains editor ehm... VS misses too many functionalities LOL it's like using notepad!

  • John :)

    I obviously disagree with the exaggeration but I definitely like having Resharper in Visual Studio.

    Z

Page 1 of 1 (11 items)
Leave a Comment
  • Please add 7 and 3 and type the answer here:
  • Post