How to edit (customize) Color Themes in VS2017 Preview
Asked Answered
C

6

43

has anyone figures out, how to change the color theme in VS2017.

I used a custom Theme in 2012 and later in 2013. I imported it with the Extension. But I was also able to Import the theme via registry to the Express Versions, where the Extension wasn't running.

In 2017 there is no Extenesion (yet!? - I hope it is coming, I can't stand that blue or black or White), and I didn't found the place in the registry.

Calk answered 5/12, 2016 at 21:19 Comment(0)
C
54

The actual extension is now live for VS 2017. – vaindil

The official Visual Studio 2017 Color Theme Editor has arrived! I recommend using it instead of the hack below. Since the hacked version has some downsides that the official plugin does not have: it requires restarting visual studio when importing themes, plugin updates cause loosing themes, it doesn't define all colors that VS2017 uses.

Still, people might find use in hacking VSIX-files to get old Visual Studio plugins working. Therefore I leave the original answer below for reference.

Original answer: hacking plugin VSIX-file

With some hacking you CAN install the VS2015 Color Theme Editor or the VS2013 Color Theme Editor. I tried it and it more or less appears to work*.

  • download the linked VSIX-file and save it somewhere (e.g. in ColorThemeEditor.vsix);
  • VSIX-files are zip archives, open its contents for editing (or extract it and recompress it after editing) (for example with 7-Zip);
  • Edit extension.vsixmanifest;

    • there are two InstallationTargets (Id="Microsoft.VisualStudio.Pro" and Id="Microsoft.VisualStudion.IntegratedShell");
    • change the Version from "[14.0,15.0)" or "[12.0,13.0)" to respectively "[14.0,16.0)" or "[12.0,16.0)"
    • Only for the VS2013 Color Theme Editor, remove the Dependency with DisplayName="Visual Studio Product Updates" or change it to Version="12.0.20827.3,16.0))

      Visual studio 2017 is version 15.0. Square bracket means inclusive, whereas round bracket is exclusive.

  • Save extension.vsixmanifest and ColorThemeEditor.vsix;
  • Open ColorThemeEditor.vsix via the VSIXInstaller

    There might be some warnings about incompatible versions; but if all went well `Visual Studio 2017 is among the versions in which the plugin can be installed.

  • Install the plugin for Visual Studio 2017.

Editing and saving themes is problematic, as pointed out by @RepoMan. The following work around allows you to edit a theme and save it:

  • Edit the theme as you normally would
  • Save the changes, e.g. via the save and apply button
  • Visual Studio throws a null reference exception; ignore it.
  • Visual studio is not yet affected by the changes
  • Restart Visual Studio; the new instance should have your theme changes.

*There is a problem when importing and deleting imported themes: Could not load file or assembly 'Microsoft.VisualStudio.ExtensionManager, Version=12.0.0.0. .... At first the imported theme can not be selected. After visual studio has been restarted you can select the imported theme.

Crispen answered 9/3, 2017 at 13:15 Comment(14)
Perhaps this also works for non-professional versions and for SqlServer Management Studio, when you enter an installation target with a different Id. However, I have not tried it for these versions.Crispen
It worked for me to. I already this prior to your post. Thanks the excellent explaination though. I mark this as answer, but I still hope Microsoft will deliver a real Extension for this soon.Calk
The current version on the manifest is [14.0,15.0), so its the bracket that needs to be changed, not the versionRixdollar
@NunoAgapito correct, at first I was using the VS 2013 plugin where the version string was `[12.0,13.0) later I found the 2015 version. Using [x,16.0) instead of [x,15.0] will allow support updates to Visual Studio 2017. I will update my answer.Crispen
This works for the community edition of VS 2017 also, in case anyone is wondering.Carpospore
This only partially worked for me. Whenever I tried to save changes to my custom theme, Visual Studio would throw a null reference exception and the changes would not be applied.Planula
@RepoMan I have the same problem. A work around is to save the changes, ignore the exception, and restart Visual studio. For me, the restarted Visual Studio DID have the changes applied. It's not pretty but it works more or less.Crispen
Worked for VS2017 Enterprise with updates as per 2017-04-15. No null pointer exceptions or anything. Changes became effective immediately and stayed in place. Possibly recent patches fixed backwards compatibility (as the download page for CTE for VS2015 makes no mention yet of VS2017).Costard
Also works partially for me: any time I enable or disable an extension, or install an update, my custom theme disappears and I have to re-import it.Dishonorable
@RomanStarkov same for me; the work around is definitely not perfect, but at least it allows us to use our favourite colorscheme. Any improvements I'm happy to add.Crispen
Awesome answer. I am using VS2017 Enterprise. I didn't want to create/edit any themes, but I wanted to import my theme from VS2015. When importing, it gave me some null reference errors, but it still worked! Thanks again!Thermonuclear
The actual extension is now live for VS 2017.Presumptive
Link in this answer was broken when checked on 6th Feb 2018. New link has 'VisualStudioProductTeam' changed to 'VisualStudioPlatformTeam': marketplace.visualstudio.com/…Barbate
@Montgomery'monty'Jones updated link; thanks for checking.Crispen
N
30

If you're referring to one of the 3 inbuilt themes, this link from Microsoft explains how. The relevant bit is below:

  1. On the menu bar, choose Tools, Options.
  2. In the options list, choose Environment, General.
  3. In the Color theme list, choose either the default Blue theme, Dark or Light.


If you're referring to the Color Theme Editor from Microsoft, 2013 is still the latest version (it's referenced in the link above, for 2017RC). Unfortinately it says on the same page, that you can only use it on Visual Studio Professional, Visual Studio Premium and Visual Studio Ultimate. I tried installing it on Visual Studio Community anyway, and it doesn't work.

Microsoft have also changed the format of the .vssettings file, so you can't manually import VS 2013 themes either.

I really hope you can change the theme in Visual Studio 2017 Community when it comes out.

Nicolis answered 30/12, 2016 at 8:0 Comment(7)
The "Color Theme Editor" is of course available for VS 2015. marketplace.visualstudio.com/… It is mentioned in the article because it has not been updated. And you cannot install it on VS 2017 no matter what edition are you on.Sent
Oh, I see. Have you tried it on one of those editions mentioned?Nicolis
Yes, I have professional and enterprise. Each Theme Editor version has VS version lock.Sent
Pity. Well, I guess we'll see what Microsoft does when 2017RTM is outNicolis
It is a good explaination about build-in themes. But it’s not the accepted answer, because I explicitly asked about custom themes and not the build-in themes.Calk
I have to admit, in the title and in the first part of the question, it is not clear, that I meant custom themes. But the whole question should leave no doubt about my intentions in asking this question. Should I change the title, to reflect this?Calk
Yes, I'm using VS 2017 Enterprise and I needed to change default Blue to Dark theme. That was easily changed through Tools->Options. Then select General option under Environment node. Then changed Default to Dark under Color theme droplist. Et vola :) Note you can also bring further text and background changes under Environment->Fonts and Color option.Devout
K
7

Maybe this will help a little bit. You can at least edit the way the tooltip looks without any extensions/addons. Go to Tools->Options->Environment->Fonts and Colors. Under "Show settings for:" change the dropdown to "Environment". Note that it's easy to miss this: for some reason I never saw it until now. There's 3 options in there that will let you adjust the tooltip's border, background, and default font color. Note that you can't adjust all the font colors that might appear.

I have tried this with the final (non-RC) release of VS2017 that came out today.

Settings

Klecka answered 7/3, 2017 at 21:9 Comment(1)
Upvoting. The main reason I even fool around with color themes is so I can change the tool tips.Planula
U
5

There is an easier way for using Color Theme Editor in Visual Studio 2017 with the help of an hacked version (created by Serban Var) that is available on this page. I use the following color settings for Solarized (Dark) Theme. Similarly, it is also possible to change the colors i.e. Operators, etc. for the themes you use via Tools → Options → Environment → Fonts and Colors.

Note : Please do not forger to save your currents settings before importing this settings. I used it without any problem and the only thing I need to change for Solarized Dark Theme is Operator and Item Background colors.

Plain Text: Plain Text

Operator: Operator

Utopian answered 11/4, 2017 at 7:13 Comment(2)
This worked for me -- thank you for the recommendation!Marketa
@MeghanArmes You are welcome Meghan, I am happy that it helps you ;)Pitman
P
2

The color theme editor for VS 2017 was just released, no need for hacks anymore. Grab it here.

Presumptive answered 11/8, 2017 at 16:43 Comment(1)
Good, i'm trying it.Scientific
M
0

First of all choose Blue theme then convert it to Light and then choose Dark. By doing so you will get a Dark theme as you had in VS2013 or 2015.

Miscellanea answered 21/7, 2017 at 17:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.