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...
UPDATED: Now it's complete! Works great for all my scenarios! =========
Very useful, but not quite complete.
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.
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.
Really excited to find this extension; I always have a zillion VS windows open to different git repos and I'd like to use the [gitBranchName] feature. Unfortunately, I'm unable to get this to work on VS2015.
I have "Document (no solution) open" set to:
[documentName] - [ideName] ([gitBranchName])
I have "No document or solution open" set to:
I have "solution in design mode" set to:
In all cases, I'm getting "()" at the end. Git is definitely on the system path, and I've also experimented with setting the "git binaries directory" to the same place where git appears on my system path:
"E:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git\"
I'm running VS2015 on Win10. Any ideas? Something silly I'm missing?
Is there a "bin" directory inside "E:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git\"? If so, it should be selected instead.
If it doesn't work (normally it should work if git.exe is already in the PATH), could you enable the option "Enable debug mode" in "Global rules", and let me know what it prints in the Output window (Show output from "Debug")?
I recently updated the extension to support UTF8 encoded git branch names, but this shouldn't cause the problem you are describing.
On VS 2015.3, if I disable this (very useful) extension, my boost.natjmc file is taken into account and works:
<?xml version="1.0" encoding="utf-8"?>
However, as soon as I enable it back, this no longer works.
Did anyone also see this?
I really cannot see how this extension could have any such side effect (unless your file relies in one way on the Visual Studio window title being unaltered). You can take a look at the source code if you want.
Did you try on another machine?
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#).