17

I love the Solution Explorer > Right-click > "Open Containing Folder" feature of the PowerCommands extension for Visual Studio 2010. I want the equivalent of a "Jump to location in Source Control Explorer" feature. How can I find out the location in TFS of a given open file, or a file in the solution explorer (or a file in the solution navigator in you have the Productivity Power Tools extension)?

The best answer would be a couple of mouse clicks and no keyboard. Next best answer would be a hotkey mapping.

The only solution that I have found so far is to use the Productivity Power Tools extension which has the feature "Find in Source Control". A file in the results list can be right-clicked to "Open folder in Source Control Explorer". The drawbacks to this solution is that is takes many clicks, and the search results can match more than one file if files exist with the same name in different folders.

Tim Partridge
  • 3,365
  • 1
  • 42
  • 52
  • I'm curious: Did you ever implement it? =) – DerApe Aug 05 '13 at 08:07
  • Haha. I wish. But if you have VS 2013 you can use [VSCommands](http://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-405c-a68b-5606af238ece) as psulek [answered](http://stackoverflow.com/a/20470975/224976) – Tim Partridge Dec 11 '13 at 18:29

6 Answers6

16

There is a stand-alone extension that you can download, called Locate in TFS, within Visual Studio.

"Locate in TFS" on TFS Gallery

"Locate in TFS" on GitHub

This also works on files that you "Exclude from source control", as many developers do with the web.config files.

psulek's post, above, mentions this as part of VSCommands, but I prefer the stand-alone extension.

Community
  • 1
  • 1
cat5dev
  • 1,317
  • 15
  • 12
  • This has helped me immensely today. –  Feb 19 '15 at 22:14
  • 1
    Currently supports 2010, 2012, 2013, 2015 but not 2017 – itsho Apr 26 '17 at 10:06
  • Is there a tool or efficient way for the reverse? Going from a file in Source Control Explorer to Solution Explorer? – Shiv Aug 21 '17 at 03:04
  • 1
    @itsho Now available from the same author for VS2017+ https://marketplace.visualstudio.com/items?itemName=AlexPendleton.LocateinTFS2017 – Shiv Aug 21 '17 at 03:05
12

Try Visual Studio extension VSCommands for Visual Studio 2012. It has feature called Locate in TFS. This will add new button to Solution Explorer Locate in TFS which opens active selected file/folder in TFS Source Control Explorer.

psulek
  • 4,308
  • 3
  • 29
  • 37
  • Do you know where I could find this in Visual Studio 2013? I tried to find commands in the "customize" popup -> commands -> toolbar -> VSCommandsToolBar but I did not find any option called "Locate in TFS" in it. – Micaël Félix Jan 22 '15 at 15:09
  • Did you download extension for Vs2013 from [Vs Gallery](https://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-405c-a68b-5606af238ece) ? – psulek Jan 23 '15 at 07:48
  • Sorry it works! I was trying to find how to add a custom button in my top toolbars but there's no need since it's already there... silly me! – Micaël Félix Jan 23 '15 at 08:51
  • only supports VS2013. try [cat5dev's answer](http://stackoverflow.com/a/26025029/426315) for a plugin that that supports 2010, 2012, 2013, 2015 but not VS2017 – itsho Apr 26 '17 at 10:05
5

Feature request has been raised with Visual Studio team. Read here

ambidexterous
  • 832
  • 12
  • 21
2

I know it's probably too late. See TfsExt extension for vs2010

Vi_Ros
  • 49
  • 5
1

For Visual Studio 2013 try lightweight extension TfsExt13

ViRos
  • 11
  • 1
1

I'm not sure if it's possible, but it's a good suggestion.

These two examples show how to use the Visual Studio Extensibility APIs to access the TFS Source Control Explorer APIs.

granth
  • 8,919
  • 1
  • 43
  • 60