Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit (customize) Color Themes in VS2017 Preview

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.

like image 617
Martini Bianco Avatar asked Dec 05 '16 21:12

Martini Bianco


People also ask

How do I change the color scheme in Visual Studio 2017?

Here's how to change the color theme of the IDE frame and the tool windows in Visual Studio. On the menu bar, choose Tools > Options. In the options list, choose Environment > General. In the Color theme list, choose either the default Dark theme, the Light theme, the Blue theme, or the Blue (Extra Contrast) theme.

How do I customize my Visual Studio theme?

On the menu bar, select Tools > Options. In the options list, select Environment > General. In the Color theme list, choose between the default Dark theme, the Blue theme, the Blue (Extra Contrast) theme, and the Light theme. Or, choose the Use system setting option to select the theme that Windows uses.

How do you change the color of the editor?

Go to Window > Preferences, then navigate to General > Editors > Text Editors. In the panel on the right, from the Appearance color options list select Background color, then use the color picker to choose the desired color (the System default checkbox must be unchecked).


2 Answers

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.

like image 179
Kasper van den Berg Avatar answered Sep 29 '22 02:09

Kasper van den Berg


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.

like image 39
Warpspace Avatar answered Sep 29 '22 04:09

Warpspace