Навигация

Итоги года

Другие ссылки


Реклама

Счётчики


Locating files in Solution Explorer

04.07.2008 Пятница 19:07

Software: Microsoft Visual Studio 2008

When studying unfamiliar code in Visual Studio and looking at contents of a file, have you ever wondered how to locate the same file in the Solution explorer window? That may not be easy at all if the solution has lots of projects and scores of files in them, and the way you got to open the file in the editor was through navigating symbol definitions (F12). Well, here's the remedy. For me it was real revelation since it's been many years that I've been suffering in such situations, trying to locate file either manually (by looking through all the projects in the solution) or by searching the physical media (folders on the hard drive) for the file name.

In Visual Studio:

Go to Tools —> Options —> Projects and Solutions —> General -> check Track Active Item in Solution Explorer.

This will make Visual Studio keep editor window and item selected in Solution explorer in sync. That is, if at ant time you switch from one file to another in editor window, solution explorer will find and highlight corresponding file.

Thank God this annoying issue is gone for good.

Courtesy this blog

#1 Escaper
09.10.2008 Четверг 18:11

It turned out the issue is gone but not for good. This feature sometimes fails to locate the file. As far as I can tell it fails when the project in which the target file resides is not expanded in the Solution Explorer.