Solution Explorer Sync'ing in Visual Studio 2012

Posted Sat, Sep 8 2012 19:08 by Deborah Kurata

This is just a little feature, but a very useful one: Solution Explorer now allows you to control the sync to the currently active tab.

In prior versions of Visual Studio, Solution Explorer automatically synchronized its position to the active tab. When you clicked on a tab, Solution Explorer positioned itself to that file.

This was frustrating when you were working on files in a particular component. You click on another tab to look at something and Solution Explorer automatically jumped to that file. It was possible to turn off this behavior using Tools | Options, but then you could never find where you were in Solution Explorer.

In Visual Studio 2012, Solution Explorer allows you to define when it should synchronize to the current tab. Here is how it works:

First, open one code file from one of your components and another code file from another component. The results will look something like the figure below.

image

In the above example, the Customers.cs and the CustomerWin.cs files are opened. Solution Explorer has the CustomerWin.cs highlighted.

Click on the other tab, Customers.cs in this example. Notice that Solution Explorer does not automatically sync up to the selected tab.

If you do want Solution Explorer to sync up at any time, click the Sync button in the Solution Explorer toolbar.

image

[The red box around the sync button was added for illustration.]

If you want the old behavior, where Solution Explorer tracks with the active tab, you can use Tools | Options:

image

[The red box around the sync button was added for illustration.]

Use the new Sync button any time you want to sync Solution Explorer to the active tab.

Enjoy!

Filed under: , , ,

Comments

# Interesting Finds: September 9, 2012

Sunday, September 09, 2012 9:09 AM by Jason Haley

Interesting Finds: September 9, 2012

# Solution Explorer in Visual Studio 2012

Sunday, September 09, 2012 5:53 PM by Deborah's Developer MindScape

There are lots of new Solution Explorer features in Visual Studio 2012, so many that they did not all

# re: Solution Explorer Sync'ing in Visual Studio 2012

Monday, September 10, 2012 6:41 PM by Tim

This was possible since at least 2005, as you said you turn off the auto sync option, then if you want to focus the current file in sol exp, you just right click on the header and say locate in sol exp.

# re: Solution Explorer Sync'ing in Visual Studio 2012

Monday, September 10, 2012 8:15 PM by Chris

@Tim actually you needed an extension to do that.

For VS2010, I wrote an extension that did this too. The one thing the VS2012 one doesn't do that I want is one button to Collapse then sync.

# re: Solution Explorer Sync'ing in Visual Studio 2012

Tuesday, October 09, 2012 4:19 AM by andy

how did you get the branch name showing in in visual studio window (first screenshot)?

# re: Solution Explorer Sync'ing in Visual Studio 2012

Wednesday, October 10, 2012 12:15 AM by Deborah Kurata

Hi Andy - I'm not sure what you mean by "branch name "?

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: