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?
相关问题
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- Visual Studio 2019 - error MSB8020: The build tool
- 'System.Threading.ThreadAbortException' in
- Visual Studio 2010 randomly says the command line
相关文章
- How to show location of errors, references to memb
- Log4Net Multiple Projects
- How to track MongoDB requests from a console appli
- Compiling error in C++ project with C and C++ code
- Visual Studio Hangs on Loading UI Library
- How to use Mercurial from Visual Studio 2010?
- VSIX: execute code on VS startup
- Copy different file to output directory for releas
VS2012 added a new command called
SolutionExplorer.SyncWithActiveDocument
. The default shortcut for c# is Ctrl+[,SThis 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.
Credit (James' comment)
This worked for me
Visual Studio 2012 has a new shortcut
Ctrl [, S
. Yes you have to typeCtrl [
and then release and then immediately typeS
(or click the little sync icon at the top of Solution Explored). It will synchronize to the item.Of course you can change the shortcut. I think I'll try
Alt+L
for locate.Usually this is more useful than always tracking, which in older versions always was a disaster because it would track 100 items in a row and then be jumping all over the place...
Brian Schmitt has a great Locate File in Solution Explorer – Visual Studio Macro post for this. The macro is extremely simple and quick. Basically it toggles the setting
so that the current file ends up selected in the Solution Explorer but, because it is not left on, you don't get irritated by Solution Explorer nodes being expanded for all the files you access.
Bind a Keyboard ShortCut to this custom macro to effectively create what should be a built-in Visual Studio feature.
This is actually built in to visual studio without the need for ReSharper (which I love BTW).
http://blogs.msdn.com/b/zainnab/archive/2010/03/29/track-active-item-in-solution-explorer-vstipproj0011.aspx
If you want to select the file in the solution explorer on command and don't want to install anything then I would recommend this macro.
I've tested it, setting the shortcut to Alt+T, and I can confirm that it works with VS 2010.
Thanks to Dan Vanderboom for writing it.