How to jump to a file in the Source Control Explorer in Visual Studio
Asked Answered
P

7

18

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.

Persson answered 13/12, 2010 at 18:24 Comment(2)
I'm curious: Did you ever implement it? =)Miraflores
Haha. I wish. But if you have VS 2013 you can use VSCommands as psulek answeredPersson
B
13

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.

Boustrophedon answered 9/12, 2013 at 12:42 Comment(4)
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.Kutch
Did you download extension for Vs2013 from Vs Gallery ?Boustrophedon
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!Kutch
only supports VS2013. try cat5dev's answer for a plugin that that supports 2010, 2012, 2013, 2015 but not VS2017Randeerandel
S
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.

Soliloquize answered 24/9, 2014 at 19:34 Comment(4)
This has helped me immensely today.Kieffer
Currently supports 2010, 2012, 2013, 2015 but not 2017Randeerandel
Is there a tool or efficient way for the reverse? Going from a file in Source Control Explorer to Solution Explorer?Earthward
@Randeerandel Now available from the same author for VS2017+ marketplace.visualstudio.com/…Earthward
B
13

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.

Boustrophedon answered 9/12, 2013 at 12:42 Comment(4)
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.Kutch
Did you download extension for Vs2013 from Vs Gallery ?Boustrophedon
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!Kutch
only supports VS2013. try cat5dev's answer for a plugin that that supports 2010, 2012, 2013, 2015 but not VS2017Randeerandel
L
5

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

Lysenko answered 19/11, 2012 at 22:15 Comment(3)
Thanks for sharing. All those looking for this feature should go to the link provided and add their votesPersson
Sadly the link has rotted.Kauppi
never heard that term in this context, very applicable (rotted indeed, and sad as well)Lysenko
R
2

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

Razzia answered 11/4, 2014 at 17:49 Comment(0)
B
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.

Butterball answered 27/12, 2010 at 7:26 Comment(1)
Thanks for the links. They are very helpful. If I feel ambitious I might take on the add-in myself!Persson
S
1

For Visual Studio 2013 try lightweight extension TfsExt13

Sprag answered 16/2, 2015 at 16:18 Comment(0)
B
0

For Visual Studio 2022, use this one: Locate in TFS 2022

Bullshit answered 18/2, 2024 at 9:45 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.