Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I have an open code file in Visual Studio that I am editing I would like to keep that same file highlighted inside of the solution Explorer so that I know where I am at.

What I'd really like is to change the focus to a different code file and the solution explorer to move to the file that I am editing.

Further Explanation and example:

  • I have a project with 2 files: Class1 and Class2.
  • I open both files. The focus is on Class1.
  • I click on the Class2 Tab, thereby changing the file that I am editing to Class2.

Desired Behavior: The solution explorer will highlight Class2.

share|improve this question
up vote 64 down vote accepted

Tools - Options - Projects and Solutions - General - Track Active Item In Solution Explorer

I don't have full Visual Studio, only the Express Editions, where it seems to be checked by default for VB.NET and unchecked by default in C++.NET.

share|improve this answer
It's not immediately clear that when you turn this option off in VS2012 (maybe 2010 as well), you get a 'Sync' button in the solution explorer. This prevents your solution view from jumping all over the place and expanding the source tree to each new file, which drives me nuts when I'm following references through a larger project. This is what osh's answer is all about, but I thought it was worth noting that the same option controls/hides the sync button in later versions. Now if I can just set up a keybinding... – Patrick M Sep 10 '13 at 17:14
@PatrickM I'm not sure if it was possible in older versions but you can set a keybinding in VS2013 and 2015; Tools > Options > Environment > Keyboard. The command you're looking for is 'View.TrackActivityinSolutionExplorer'. – Rory McCrossan Nov 10 '15 at 11:33
Waah, I have this ticked and it still doesn't synchronise. I've checked, and the file is included in the project. I actually ended up turning this option OFF, and then pressing the newly-appeared SYNC button, which was the only way I could get it to work. – Matt Feb 24 at 19:47

I prefer using the Solution Explorer Tools extension. It allows me to work most of the time without syncying code with solution explorer. when I want to sync I just press the sync button on the solution explorer. It can be downloaded here.

share|improve this answer
Welcome to Super User! It would be nice to include the essential parts of the answer here, and provide the link only for future reference. – slhck Mar 31 '12 at 12:44
Nice! Just what I was looking for- Did not want the old VS2008 style jumping all over the place - only when i need it. +1 (VS2012 has this built in ;) – ppumkin Aug 30 '12 at 8:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.