Differentiating Visual Studio instances

Mads Kristensen

When you have multiple instances of Visual Studio open at the same time, it can be tricky to tell them apart. Especially if you’re working on different branches of the same solution, which makes them look almost identical. What if each instance could have a unique color so you could instantly tell them apart? Would you use it?

Colors applied to Visual Studio

The Peacock extension for Visual Studio Code does exactly that, and with 1.7 million installs it appears to be working great for lots of developers. A feature request on the Visual Studio Developer Community is gaining steam asking for the same feature be added to Visual Studio, so please vote and comment if you’re interested.

An experiment

Due to the UI differences in Visual Studio Code, it may not be desirable to port Peacock as is to Visual Studio. Instead, we may need a different UI paradigm and colorization scheme. Let’s experiment and keep iterating to find the best solution together.

We’re starting out with an extension to kick off the experiment. We call it Solution Colors and the first iteration puts a 3-pixel thick colored line above the status bar (see image above).

Getting started

After installing the extension, you are ready to start colorizing Visual Studio. The way it works is that you manually assign a color to a solution, by right-clicking the top tree node in Solution Explorer.

Solution/Folder context menu

Every time you open that solution, the extension applies the color automatically. Select None from the list to remove it again. It works for both solutions and for folder-based workspaces (CMake, etc.).

You can adjust the thickness of the line from the Tools -> Options dialog to suit your liking. Find it under Environment -> Fonts and Colors -> Solution Colors.

Options for Solution Colors

Both built in and custom themes are not affected by this colorization.

Next steps

If this feature is interesting to you, please install the Solution Colors extensions and take it for a ride. Make sure to share any ideas and bugs on the GitHub issue tracker, and feel free to send pull requests too. The feature request ticket is a great place to share your comments and thoughts, so make sure to vote and comment there as well.

Do you like the idea of community experiments like this one? Let us know in the comments below.

36 comments

Comments are closed. Login to edit/delete your existing comments

  • Eugene Astafiev 3

    Installed, these small bits make our lives easier! Thanks

  • MgSam 0

    Will there be any way to differentiate the same solution in different instances of Visual Studio? I often have to work on the same solution on different branches at the same time (I have the repo cloned twice).

    • Mads KristensenMicrosoft employee 0

      Yes, each branch can have its own color. The only thing needed to make it work is that the solution/folder path is unique.

  • Eric Harmon 1

    Interesting! This will be useful for me now and then.

    I do like the idea of community experiments like this.

  • hYam 0

    I use many solutions.
    So it is a hassle to select the color every time.
    It would be nice to have an “auto” color.
    A feature that automatically determines the color from a hash value of the solution name.

    • Yves Goergen 0

      Will you be able to remember all those colours then? An icon would be much more readable. See my comment below (once a moderator has shown up to approve it).

      • Mads KristensenMicrosoft employee 0

        The latest version now has both an auto-mode and icons on the task bar

  • Stuart Ballard 6

    I just wish Windows would let us have them as separate buttons on the taskbar again. That’s been the biggest thing making it impossible to keep track of – that and not being able to put them in a standard ordering on the taskbar.

    • TS 2

      This is a major reason why I’m retaining Windows 10. Adding visual hints to VS[C] doesn’t really solve a problem that originates in the shell UI…

    • Yves Goergen 0

      That’s easy (on Windows 10): use 7+ Taskbar Tweaker. https://tweaker.ramensoftware.com I’m using it since Windows 7 and will miss it on Windows 11, but other tweaks can be found on that website for newer versions, too. There are already many users who are dissatisfied with how unusable and unhelpful the taskbar has become and most problems have been resolved by the community, even though Microsoft is so self-convinced and always makes it hard to do that work.

  • Roger B 1

    It’s the small things in life 🙂

    I was just lamenting this because VS only displays the solution name (no path except when hovering) in the Title bar and I’m embarrassed to admit I routinely lose a ton of time building the wrong variation of the project since I typically have 2 of them open in different paths. This little UI tweak is just enough for that to hopefully never happen again. Thanks!

    #team1px

  • Tea Zack Reeves 0

    what flavor of VS does it work on? I have VS2022, VS2019 and VS2017 installed on my PC. When I try to install Solution Color extensions, it gives me an error – This extension is not installable on any currently installed products

  • Russ Freeman 0

    It would be great to have an auto-color option where the name of the solution is used to generate a hash to pick a colour by default if no specific color has been chosen yet.

    • Mads KristensenMicrosoft employee 0

      The latest version now has this feature

  • Alex Vallat 1

    I often have multiple VS solutions open at once, but it’s not just telling them apart that’s the problem, opening files in the correct instance. I wrote VsReveal to help with this, might be useful to other people working with multiple solutions too.

  • Sam D. 3

    Or, how about doing something crazy like, putting the full path in the title bar?

    • Georg Bisseling 0

      together with info about the branch maybe

  • Yves Goergen 0

    This problem has already been solved much better. Unfortunately, the ever changing VS extensibility API has destroyed it already two times. Time to bring it to the core, now that Microsoft is finally aware of the problem.

    https://github.com/ashmind/SolutionIcon

    PS: Also requires improving the Windows 10 taskbar to not combine multiple icons of the same application. (A Windows 11 version isn’t available yet, but who needs Windows 11 if all it does is change but not improve.)

    https://tweaker.ramensoftware.com/

    Oh, looks like there’s a new effort for this method:

    https://windhawk.net/mods/lm-vs-solution-icon

  • Robert Belcher 1

    Setting window colors is not a good solution for this problem IMO. It’s completely manual, and the information it adds must be remembered.

    I’ve been really liking this extension that customizes the solution name in the title bar to include Git/TFVC branch name and parent folder (and you can use the full path instead if you prefer): Customize Visual Studio Window Title. I would much prefer to see something like this built into VS.

    • Roger B 0

      Ahhh! Thank you for mentioning that extension. Yes, I like that more than the color that I have to memorize.

  • Kim Homann 0

    Don’t call it “Visual Studio” when you’re talking about Visual Studio Code. This made me waste 5 minutes with an article that is absolutely not interesting for me as a Visual Studio user.

    • Yves Goergen 0

      Hm? This article is about Visual Studio, not Code. While I also do think that “VS” Code is the worst name that the product could be given, it doesn’t apply here.

  • Dmitriy Sokolov 0

    Installed. Thanks for your help. Good example of small things that make our life easier:)

  • Dmitriy Makarov 1

    Thank you. Very useful! I would like two more features: 1. Color based on the default name hash; 2. The ability to put the project logo in the header as translucent.

    • Mads KristensenMicrosoft employee 0

      The latest version now has the ability to auto-assign colors based on the solution path hash. It also adds the color to the task bar icons

  • Yanesh Tyagi 0

    What about VS for Mac support?

  • Juliano Goncalves 0

    Mads, can you elaborate about where this setting is persisted? Does it go inside the “.vs” folder along other solution-related caches, like the .suo? Or does it keep its own tracking of which solution is which color somewhere else?

    Asking just to understand if clearing the “.vs” folder would eliminate this information or not, since that is something I actually do with some frequency.

    • Mads KristensenMicrosoft employee 0

      It’s stored in the .vs folder in a file called color.txt

  • Neil MacMullen 0

    I’ve raised several feedback comments suggesting that the _theme_ should be optionally coupled to the solution rather than the user. I would like more distinction than just a small bar at the bottom of the screen. VS Code is far more flexible in this regard – I can use a red-theme for a release branch to warn me I’m working on something critical in which case the entire window background is red rather than some tiny piece of the UI.

  • Jim Waite 1

    There is also this extension: https://marketplace.visualstudio.com/items?itemName=Wumpf.SolutionColor which has been around for a while.

    It colours the main title bar which I think has a bit more visual impact than a 3-pixel thick line (of course, if you are in full-screen mode, colouring the title bar doesn’t help)

    (note: the Wumpf.SolutionColor extension hasn’t been entirely updated for VS2022, (works fine on older versions). There are some workarounds on the author’s github to make it work in VS2022)

  • Peter Nimmo 0

    For those unfortunate people like me who have to use TFS, could you also add a setting to make it so that all Visual Studio instances share the same view of TFS Included and Excluded changes, one of the problems of having multiple Visual Studios open is that if you accidentally submit from the wrong instance of Visual Studio you can find yourself checking in files that weren’t meant to be part of the final changelist.

    Also it would be really good if there was a feature to automatically create a GIT Branch of the current state of a set of folders, so that you could iterate on to create a new feature and then once you were finished commit those changes back into the TFS view of the source.

    As currently you can only check against the previous checked in state of the files, when often you might want to do a diff against the last time you reached a milestone, but all you can do as add one more shelf set. It would be so much easier to do all that using GIT and then merging the final changes back into TFS.

  • Kevin Pattison 0

    Nice differentiator. Perhaps consideration of having multiple desktops with allocated name for each desktop might be useful also – while running a few instances concurrently. If only the desktop name appeared in the VS status bar or the VS heading. Colours are useful, however over time does allow for some muddling, yet with named desktops the clarity might have longer lasting gains. These assists are truly appreciated, Thanks.

  • Gauthier M. 0

    Just fix your awful windows 11 taskbar by adding the possibility to “ungrouping similar apps” + “show window title” and that’s done…

    Windows 11 is the most unusable version of windows I have ever seen (and I used to love Window 8, so no excuse)

  • Jason King 0

    Looks pretty spiffy! It would be nice if the solution colors could appear next to the solution name in the Open dialog, but I suspect that might be a whole different set of settings and parsing from what was required for what’s currently in the extension. For the places it does show up, this is a well done and useful addition to VS!

  • Alexander Gayko 0

    Hey, I solved this problem years ago by allowing for putting a file specifying a VS theme name into the solution folder, so it can go into source control.
    This also enables branch-specific visual distinction, if people want that, too 🙂

    Built this extension for that purpose: AutoThemeSwitcher

  • Алексей Пшеничный 0

    Although particularly idea of colorization of solutions does not make any sense to me, I’m excited about the whole idea of community experiments. Mad, please, keep going and keep us updated!

Feedback usabilla icon