What’s new in Visual Studio 2012 Solution Explorer

Off late I’ve been asked to present to customers about what’s new in Visual Studio 2012. Things has got definitely better with Visual Studio 2012. Following are the noticeable changes in Visual Studio 2012 solution explorer…

Changes in Solution Explorer

image

You’ll notice that the solution explorer toolbar has more buttons (some of them were there in previous version of Visual Studio as well).

  1. image The first two buttons are the forward and backward buttons, they allow us to switch between one view to another view just like the browser back and forward buttons.
  2. image The next button is the home button, anytime to return to the default solution explorer view click this button.
  3. image This button shows list of pending changes to commit.
  4. image Sync with active document. The current active document file is selected in the solution explorer, nodes are expanded and file is scrolled into view to display the selection.
  5. image Refreshes solution explorer view.
  6. image Collapse all. If you’ve got several nodes expanded in the Solution Explorer then this action will collapse all expanded nodes.
  7. image Show all files. Shows all the files in the project folder, even those that are not added to the project like ReadMe.txt files etc.
  8. image Shows project properties.
  9. image Enables previewing of files. When you select a file the file get’s previewed (does not add this file to the list of open files) and when the next file is selected the previous previewed file is closed hence the file view does not clutter up. Previously we had to double click to view the file.
  10. image Code map. Click on this button to see a video on how to use this tool.
 
 
Scoped view in Solution Explorer

Imagine a scenario where you’ve got 10’s of projects in the solution explorer and you don’t really open/use those projects but just because there is no way to get rid of the view of these projects you’ve got bear them.

In Visual Studio 2012 there is something called as scoped view. See below example were I have 5 projects and for now I’ll be working on just one project MFCLibrary1…

image

Question is how can I disable the view of the other unwanted projects!. Visual Studio 2012 provides something called as scoped viewing were in you can right click any file, folder, and project and say “Scope to this”.

image

And in an instant this is what you see

image

Now few questions: Where did the rest of projects go? How can I get back to the default view? How can I come back to this view?

The rest of the projects are hidden from view. How to get back to the previous view? Click on the ‘back’ button to get back to previous view, and to come to this view again click the ‘forward’ button. At any time to get back to the default view press the ‘home’ button on the toolbar.

 

New Solution Explorer View

How about this? Create a new solution explorer itself? :). Think about multiple monitor setups and every monitor having its on solution explorer view :D.

How to setup this view? RIght click on any file, folder or project in the solution explorer window.

image

Once you click you’ll see a new floating ‘Solution explorer view’ as shown below…

image

Now we have two solution explorers, drag the new one to the other monitor and work from there. Now you might ask what’s the use of solution explorer without source files?

To make things more interesting we can create a new instance of Visual Studio as well (its called a new ‘tab well’) from this instance of the running Visual Studio. How to do this…

  1. Press Ctrl
  2. Use mouse to select multiple open files in the open document well, this is how the files will look like after selection…
    image
  3. Drag these documents out, voila,
  4. You now have a new instance of Visual Studio as shown below…
    image
  5. Drag this new instance to the other monitor and attach the new solution explorer to this new Visual Studio instance.
  6. You now have a new full fledged Visual Studio as shown below…
    image
 
Conclusion

I’ve listed out most of the changes in Visual Studio 2012 Solution Explorer, I’ll follow up with other sub topics on Visual Studio 2012 shortly.

Appreciate your comments...