93

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.

thepaulpage
  • 1,670

3 Answers3

132

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.

Draemon
  • 778
Martin
  • 2,865
12

"CTL + '[', S" will synchronize the solution explorer with the file in the current edit window.

Metro
  • 261
11

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.

osh
  • 111