<p>In Visual Studio 2005, whenever I would view a file in the main editor, the Solution Explorer would find and highlight that file.  Some time ago, this stopped working and the Solution Explorer would do nothing.</p>

<p>This has become quite a pain since following a chain of "Go To Definition"s can lead you all over your solution.  Where is the setting to turn this back on?</p>

[{'answer_id': 31168, 'author': 'Sir Rippov the Maple', 'author_id': 2822, 'author_profile': 'https://Stackoverflow.com/users/2822', 'pm_score': 4, 'selected': False, 'text': '<ol>\n<li>Navigate to Tools -> Options</li>\n<li>Select "Projects and Solutions" in the tree view on the left</li>\n<li>Select "Track Active Item in Solution Explorer"</li>\n</ol>\n'}, {'answer_id': 31170, 'author': 'OwenP', 'author_id': 2547, 'author_profile': 'https://Stackoverflow.com/users/2547', 'pm_score': 7, 'selected': True, 'text': '<p>Click on the Tools → Options menu.  Select the Projects and Solutions → General option page.</p>\n\n<p>Make sure "Track active item in Solution Explorer" is checked.  That should do it.</p>\n'}, {'answer_id': 31178, 'author': 'brendan', 'author_id': 225, 'author_profile': 'https://Stackoverflow.com/users/225', 'pm_score': 2, 'selected': False, 'text': '<p>Tools->Options->Project and Solutions->General</p>\n\n<p>Check the box "Track Active Item in Solution Explorer"</p>\n'}, {'answer_id': 46193, 'author': 'Owen', 'author_id': 4790, 'author_profile': 'https://Stackoverflow.com/users/4790', 'pm_score': 5, 'selected': False, 'text': '<p>I like to keep this option turned off (especially when working with a big project), but it\'s useful to be able to find the file in the tree now and then. I found a way to do this <a href="http://weblogs.asp.net/kdente/archive/2008/04/30/locating-the-active-item-in-solution-explorer.aspx" rel="nofollow noreferrer">here</a>.</p>\n\n<p>I hope I\'m not being too verbose here, but here\'s the guide to making this work that I wrote for my work\'s wiki:</p>\n\n<ol>\n<li>Go to Tools->Macros->Macro Explorer.</li>\n<li>In the Macro Explorer tree that comes up, right-click MyMacros, and then New Module....</li>\n<li>Call the new module SyncItem (if you want).</li>\n<li>Right-click the new module, then Edit.</li>\n<li>Paste this into the code window. (I don\'t know or care if the Imports lines are necessary; they\'re just there by default.) </li>\n</ol>\n\n<p>code:</p>\n\n<pre><code>Imports System\nImports EnvDTE\nImports EnvDTE80\nImports EnvDTE90\nImports System.Diagnostics\n\nPublic Module SyncItem\n\n    Sub SyncSolutionExplorer()\n        DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer")\n        DTE.ExecuteCommand("View.TrackActivityinSolutionExplorer")\n    End Sub\n\nEnd Module\n</code></pre>\n\n<p>The macro is most useful if you bind it to a keystroke. Here\'s how to do that:</p>\n\n<ol>\n<li>Go to Tools->Options, then select Environment->Keyboard.</li>\n<li>Find the new macro in the list (start typing "syncitem" or similar in the search box).</li>\n<li>I choose <kbd>Alt</kbd>-<kbd>Shift</kbd>-<kbd>T</kbd> (which this dialog box likes to call <kbd>Shift</kbd>-<kbd>Alt</kbd>-<kbd>T</kbd>) for, um, "Tree," I guess? If you\'re a fan of <code>Edit.LineTranspose</code>, whatever that is (I think it swaps the current line with the following one), then you might like to pick a different shortcut. </li>\n</ol>\n'}, {'answer_id': 1295739, 'author': 'Sub-Star', 'author_id': 66077, 'author_profile': 'https://Stackoverflow.com/users/66077', 'pm_score': 4, 'selected': False, 'text': '<p>I just discovered that <a href="http://www.jetbrains.com/resharper/index.html" rel="noreferrer">ReSharper</a> can do what Owen suggests. I have disabled the "Track active item in Solution Explorer"-setting, and when I\'m working in a source-file I press Shift + Alt + L and the file is selected in the Solution Explorer. I haven\'t changed the binding, so I guess that is the default. The upside to this is that you don\'t have to create a macro and then bind it to a keystroke (although not very difficult, it still has to be done). The downside is that ReSharper isn\'t free, so it\'s probably not a solution for everybody.</p>\n'}, {'answer_id': 8124910, 'author': 'rob', 'author_id': 799759, 'author_profile': 'https://Stackoverflow.com/users/799759', 'pm_score': 2, 'selected': False, 'text': '<p>Tools -> Options -> Environment -> Keyboard</p>\n\n<p>Assign the command</p>\n\n<p>View.TrackActivityinSolutionExplorer</p>\n\n<p>(I use Alt+L)</p>\n\n<p>then to use always hit Alt+L followed by Alt+L</p>\n\n<p>which turns on the feature and locates the file in the source tree and then turns it off again to stop the location bouncing around when you do not want it to.</p>\n'}]
['https://Stackoverflow.com/questions/31163', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3259/']