We work on several different branches of the same code, and when working on two branches at once, it can become confusing and time wasting.
Presently, the VS title bar has the text <solution-name> - Visual Studio
.
Is it possible for me to write an extension that will make that text <solution-name>: <branch-name> - <Visual Studio>
?
I added a symbolic link with a different name targeting the solution file. Open the solution with the symbolic link and the window title has the symbolic link name.
In windows: mklink BlawBranch.sln Blaw.sln
EDIT: Found that a hard link breaks if target .sln file is updated by our source control. A symbolic link doesn't have the same problem.
there is a property by name AppName for any visual studio based IDE, that should do the trick.
From http://www.helixoft.com/blog/archives/32 sets the title to the current filename. It also works on Visual Studio 10
In 2012, you have to set
System.Windows.Application.Current.MainWindow.Title
in order for this to work. This will update both the TaskBarItem title and the MainWindow title.This is only possible from the main thread and since the title will get updated at various points by Visual Studio, you have to hook up to some events and reset it to whatever you wanted it to be (in my AddIn, I use some
EnvDTE.SolutionEvents
among others).Hope this helps.
Perhaps a simpler solution would be to use virtual desktops? Spacial arrangement is easier to remember, you could group any related windows with the corresponding VS, and switching would be simpler.