Display solution/file path in the Visual Studio IDE

Viewed 45914

I frequently work with multiple instances of Visual Studio, often working on different branches of the same solution.

Visual C++ 6.0 used to display the full path of the current source file in its title bar, but Visual Studio 2005 doesn't appear to do this. This makes it slightly more awkward than it should be to work out which branch of the solution I'm currently looking at (the quickest way I know of is to hover over a tab so you get the source file's path as a tooltip).

Is there a way to get the full solution or file path into the title bar, or at least somewhere that's always visible, so I can quickly tell which branch is loaded into each instance?

14 Answers

There is not a native way to do it, but you can achieve it with a macro. The details are described here in full: How To Show Full File Path (or Anything Else) in VS 2005 Title Bar

You just have to add a little Visual Basic macro to the EvironmentEvents macro section and restart Visual Studio.

Note: The path will not show up when you first load Visual Studio, but it will whenever you change which file you are viewing. There is probably a way to fix this, but it doesn't seem like a big deal.

Related note: As an alternative, for Visual Studio 2005 you can use the command menu FileAdvanced Save Options. The dialog displays the full path of the current file, and you are able to copy the text.

TabsStudio | US$49

It is a pretty good (although paid) Visual Studio extension that provides:

  • Tab grouping
  • Tab coloring
  • Title transformation
  • Lots of customization and extensions

Tabs Studio Screenshot

File Path On Footer | Free

It displays the full file path on the bottom of the editor window:

File Path On Footer Screenshot

Honorable Mention: Visual Studio Code

Visual Studio Code version 1.26 implemented breadcrumbs which displays the file path in a separate row at the top of the editor window when using tabs or inline the file name when in its own window.

Visual Studio Code Breadcrumbs Screenshot

File > Preferences > Settings >> Window:Title

I just changed ${activeEditorShort} => ${activeEditorLong}

within the setting: ${dirty}${activeEditorLong}${separator}${rootName}${separator}${appName}

Worked immediately when I clicked a file.

Great help right in the setting ...

Window: Title -- Controls the window title based on the active editor. Variables are substituted based on the context:

${activeEditorShort}: the file name (e.g. myFile.txt).

${activeEditorMedium}: the path of the file relative to the workspace folder (e.g. myFolder/myFileFolder/myFile.txt).

...

Visual Studio Code Version: 1.56.2 Date: 2021-05-12

I found one reference saying this existed since 2017.

Related