How to locate a file in Solution Explorer in Visua

2019-01-20 22:14发布

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?

13条回答
再贱就再见
2楼-- · 2019-01-20 22:39

If you have ReSharper and want to add "Locate in Solution Explorer" to the tab's context menu:

  1. Go to Tools -> Customize -> Commands -> Context Menu
  2. Select "Other Context Menus | Easy MDI Document Window".
  3. Click "Add Command".
  4. Choose "Resharper" -> "ReSharper_LocateInSolutionOrAssemblyExplorer"
  5. "OK" -> "Close"

Now, when right click on any tab and you'll see a new option: Locate in Solution Explorer.

UPDATE:

Following the comment from @jeremy-paskali, you can set a keyboard shortcut for this command:

  1. Go to Tools -> Customize -> "Keyboard..."
  2. Search for "ReSharper.ReSharper_LocateInSolutionOrAssemblyExplorer" in the "Show commands containing" field and select it.
  3. Review the currently assigned shortcuts in the drop down below.
  4. Make any changes, if needed.
  5. "OK" -> "Close"
查看更多
登录 后发表回答