44

We are moving to a process where multiple developers will be working on solutions in a couple of different TFS branches. Already there has been confusion where people open solutions from a branch different to what they intend. The MRU list in VS 2010 only shows the solution name, not branch name. It's also not clear once the solution is open unless people check Properties or mouse over the current tab.

Is there a VS option or extension where the current TFS branch is prominently shown in some way? Or even a solution based on what folders the solution has been opened from on the file system?

Alex Angas
  • 59,219
  • 41
  • 137
  • 210
  • I find it useful to rename the .sln files when I check out a branch and add a tag to the name indicating which branch it's from. It's not particularly "clean," but it's easy. – James McNellis Sep 06 '11 at 04:03

2 Answers2

60

There is a very simple VS extension titled Customize Visual Studio Window Title. Once installed it will show the solution name plus the parent folder in the VS windows title bar instead of just the solution name.

For example:

TotallyAwesomeSolution becomes NewFeatureA\TotallyAwesomeSolution

Martin Backasch
  • 1,829
  • 3
  • 20
  • 30
James Wulkan
  • 788
  • 6
  • 12
  • The current version allows to configure the min and max depth distance from the solution file, not only the parent folder. This is great because only with the parent folder, in many cases, it's not enough to differentiate the branches. – Francesc Castells Nov 06 '15 at 06:37
  • And you can also add special tags, like [workspaceName] – Francesc Castells Nov 06 '15 at 07:01
  • Specifically, you want to set "farthest parent folder depth" to a large number (something like 99 should work). – Kat May 18 '16 at 21:09
  • For VS2013 - https://github.com/mayerwin/vs-customize-window-title/releases/tag/3.8.1 – Marisol Gutiérrez Apr 03 '19 at 19:23
  • 3
    To make it work with VS2019 follow this [SO question](https://stackoverflow.com/questions/53636350/re-enable-title-bar-in-visual-studio-2019/54600661) – Jaqen H'ghar Oct 06 '19 at 18:07
0

It is not easy to see it. What I have done in the past is to create a workspace per branch. Then in the Source Control Explorer and the Pending Changes window you see the currently selected workspace and thus the active branch.

Ewald Hofman
  • 12,688
  • 3
  • 39
  • 44
  • That's a way to see the active branch (=workspace) in Source Control Explorer and Pending Changes only. What branch the files in Solution Explorer belongs to is something different. – Max Apr 02 '14 at 15:50
  • 1
    You can use the VS Commands extension for this purpose: http://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-405c-a68b-5606af238ece – Ewald Hofman Apr 03 '14 at 03:47