Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to locate a file in Solution Explorer in Visual Studio 2010?

I have a huge solution with multiple projects. Sometime I need to navigate to a file in Solution Explorer. Using the VS 2010 'Navigate To' feature I can open any file by name in Visual Studio 2010 but I want to be able to select the file in Solution Explorer as well?

like image 991
Amitabh Avatar asked Aug 08 '10 21:08

Amitabh


People also ask

How do I find the location of a file in Visual Studio?

Did you know you can right click on the tab in the code editor window to access the file path or to open the folder in Windows Explorer? Check it out. By default, the file path for Visual Studio projects is very long.


2 Answers

There's an option to track the active (open and viewed) item in the solution explorer. If the file is in view, the file in the solution explorer will be selected.

Tools->Options->Projects and Solutions->Track Active Item in Solution Explorer

like image 125
Jeff Mercado Avatar answered Sep 28 '22 01:09

Jeff Mercado


VS2012 added a new command called SolutionExplorer.SyncWithActiveDocument. The default shortcut for c# is Ctrl+[,S

This command will navigate to the active file in the Solution Explorer.

Also, it seems that you need to have the "Track Active Item in Solution Explorer" option turned off.

like image 35
Aaron Carlson Avatar answered Sep 28 '22 01:09

Aaron Carlson