This lightweight extension will change the window title of Visual Studio to include a folder tree with a configurable min depth and max depth distance from the solution/project file, or using special tags.
It can also be configured so that the renaming rules apply only when at...
Missing: The "ParentX" tag gives a great way to back up the path to get where you want... but I need the opposite. It'd be nice to have a "PathX" tag that would let you walk down from the top. For solution path of "C:\folder1\branch\anotherFolder\solutionFolder\solution.sln", then Path0=C:, Path1="folder1", Path2="branch", etc. We have solutions scattered all over multiple folders and multiple depths, but the branch name is always the 3rd item in on the path. It would be nice to pull that and display it.
Please note that you can already implement the desired pattern with the 3.1 beta, by adding solution-specific overrides (either in separate files or in a master file) and hardcode the desired path. Dynamic tag replacement is nice but in a particular case like yours, you would just write once the perfect pattern for each solution and be all set.
Your suggestion is still relevant however, implementing the following tag formats should be helpful and intuitive: [path:0],[path:0:3],[parent:0],[parent:-3:0], where the first number is the first (or only) index to show, and the second number is the last index to show. In the case of path, from the root (C:\ = 0), and in the case of parent, from the current element. I will try to implement that in the next release.
This extension is a MUST when working with multiple branches of a project at once. I changed my settings to display just the solution name and the current branch: [solutionName] ([gitBranchName]) Easy peasy.
I have two suggestions: 1. Ability to set a custom title (which is a map between the full solution path to a custom text). This is useful if you have multiple clones of the same repository in different folders and the folder structure is deep.
2. Ability to also show the current startup project(s) name in header
Guess #1 one could be done easily. Some context menu entry "Override solution name", but that's just a suggestion.
Hi, #1 is already possible by changing the options (in Tools > Options > Rename Visual Studio Title). You can select [parentX] tags to only show any parent folder at a specific depth level instead of the full path.
For #2, you can use the tag [projectName] to show the current active project name, which should be good enough for most purpose (you just need to select the start-up project or an element within to "activate" a project).
Feel free to play with the source code if you want to add support for more tags.
This is a perfect solution and, like others said, you wonder why VS doesn't include it by default.
My TFS branch folder is always the parent to the solution, so I used [parent0] to get the branch's folder name. It wasn't obvious from the descriptions. And [parentPath] didn't work for me in this case because I wanted to use a "Farthest parent folder depth" of 10 for a document with no solution but only the branch name for a solution.
Also, TyWeb stated that you can't show the whole path, but that's not true. Just set "Farthest parent folder depth" to a high enough value (10 was deep enough for my projects) that will traverse deep enough to pick up the drive letter.
Perfect! A google search lead me to this extension and the default title option (containing-folder\solution) is exactly what I need to tell which solution folder relates to which Visual Studio 2013 instance.
Hi, the simplest way to generate one for your own solution file is to go to Visual Studio Options, then "Rename VS Window Title", then "Solution-specific overrides", then "open solution config". It should generate and open a .sln.rn.xml file in your Visual Studio window, which you can save or discard. Here is an example I just generated (nodes prefixed by __ are ignored):
<?xml version="1.0" encoding="utf-8"?>
PatternIfRunningMode="[parentPath]\[solutionName] (Running) - [ideName]"
PatternIfBreakMode="[parentPath]\[solutionName] (Debugging) - [ideName]"
PatternIfDesignMode="[parentPath]\[solutionName] - [ideName]" />
Hi, I'll look into this. Feel free to submit a pull request if you want. In the meantime, you can take advantage of the new feature allowing solution-specific overrides to hardcode the solution name or any other part of the path you want.
I'm not sure if it's the same thing, but [branchName] would be useful, I don't know if that would be too much to implement. [workspaceName] works really well, but for some scenarios the branch would be really appreciated :D
I have read the description which states this is customizable. How? I don't see an entry for it under Tools->Options. I don't see in the description how it can be done. Can someone tell me where you go to customize? Thanks.
If the [parentPath] ends in a drive I would like to get an absolute path displayed as usual.
For drives add backslash after the colon:
'F:data\vs2013' becomes 'F:\data\vs2013'
Add leading double backslash for network drives:
'server\share\data\vs2013' becomes '\\server\share\data\vs2013'
I was able to make it work with VS 2012 by adding a few lines in the manifest, however SetWindowText no longer works to modify the window title (it just affects the title of the window in the taskbar). And we cannot modify dte.MainWindow.Caption so something new needs to be found.
can you please tell me what i need to set for the "closest parent folder depth" and "farthest parent folder depth" in order for the title to display the full file path? i cant get it to work properly and I've tried every combination of numbers.
my current pattern is:
[solutionName] - [parentPath]\[documentName]
its not working.
Microsoft Visual Studio Premium 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Plugin version is 2.8.1
i tried reinstalling plugin but that didnt help
Thanks for the screenshots. This is by design: as explained in the settings description (at the bottom), [parentPath] is relative to the solution file only, not the document being displayed (which could be very far deep into the solution folder). I understand that you would like to display the document's full path, so I will try to add support for this scenario in a future version. If this is very urgent, feel free to play with the source code on Codeplex (now in C#).
I just got prompted to install a new version and since I did it, the extension fails to load. The error screen tells me to look in Visual Studio's ActivityLog.xml file and this is what's in there:
<description>End package load [ErwinMayerLabs.RenameVSWindowTitle.RenameVSWindowTitle, RenameVSWindowTitle, Version=18.104.22.168, Culture=neutral, PublicKeyToken=ceec2b7720c0179d]</description>
<hr>80004005 - E_FAIL</hr>
<errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Shell.10.0, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
I'm using VS 2012 Update 4.
Hi, thanks for reporting this issue, can you send me a message with your email via http://erwinmayer.com/contact? I will then be able to give you another build to test as I no longer have VS 2012 installed. In the meantime I have reverted to the previous version.
I was able to follow the guidelines of this excellent post on how to explicitly support multiple versions of Visual Studio:
I have updated to version 2.8.1, can you confirm it works for you?