How to edit (customize) Color Themes in VS2017 Pre

2020-02-07 19:58发布

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.

6条回答
爷的心禁止访问
2楼-- · 2020-02-07 20:01

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

查看更多
三岁会撩人
3楼-- · 2020-02-07 20:02

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

Hope this helps...

查看更多
孤傲高冷的网名
4楼-- · 2020-02-07 20:05

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.

查看更多
甜甜的少女心
5楼-- · 2020-02-07 20:13

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.

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2020-02-07 20:16

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.

查看更多
Emotional °昔
7楼-- · 2020-02-07 20:18

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

查看更多
登录 后发表回答