如何在VS2017预览中编辑(自定义)颜色主题 [英] How to edit (customize) Color Themes in VS2017 Preview
问题描述
有人知道如何在VS2017中更改颜色主题.
has anyone figures out, how to change the color theme in VS2017.
我在2012年和2013年晚些时候使用了自定义主题.我将其与扩展程序一起导入.但是我也能够通过注册表将主题导入到扩展未运行的Express Versions中.
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.
2017年还没有扩展(还!?-我希望它能来,我不能忍受那种蓝色,黑色或白色),而且我没有在注册表中找到这个地方.
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.
推荐答案
实际扩展名现已在VS 2017中上线. –
vaindil
官方 Visual Studio 2017颜色主题编辑器到了!我建议使用它而不是下面的hack.由于被黑客入侵的版本具有官方插件没有的缺点:导入主题时需要重新启动Visual Studio,插件更新会导致主题丢失,因此并不能定义VS2017使用的所有颜色.
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.
使用一些黑客手段 CAN ,安装 VS2013颜色主题编辑器.我尝试了一下,它似乎或多或少地起作用了. * .
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*.
- 下载链接的 VSIX -文件并将其保存在某个地方(例如,在
ColorThemeEditor.vsix
中); - VSIX文件是zip归档文件,打开其内容进行编辑(或在编辑后将其解压缩并重新压缩)(例如,使用
- 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
;
- 有两个
InstallationTarget
(Id="Microsoft.VisualStudio.Pro"
和Id="Microsoft.VisualStudion.IntegratedShell"
); - 将
Version
从"[14.0,15.0)"
或"[12.0,13.0)"
分别更改为"[14.0,16.0)"
或"[12.0,16.0)"
- there are two
InstallationTarget
s (Id="Microsoft.VisualStudio.Pro"
andId="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
withDisplayName="Visual Studio Product Updates"
or change it toVersion="12.0.20827.3,16.0)
)
Visual Studio 2017是15.0版. 方括号表示包含性,而方括号表示排除性.
Visual studio 2017 is version 15.0. Square bracket means inclusive, whereas round bracket is exclusive.
通过VSIXInstaller打开ColorThemeEditor.vsix
Open ColorThemeEditor.vsix
via the VSIXInstaller
可能会出现有关版本不兼容的警告.但是如果一切顺利,`Visual Studio 2017就是可以安装该插件的版本之一.
编辑和保存主题存在问题,如 @RepoMan 所指出.以下变通办法可以让您编辑主题并保存:
Editing and saving themes is problematic, as pointed out by @RepoMan. The following work around allows you to edit a theme and save it:
- 像往常一样编辑主题
- 保存更改,例如通过保存并应用"按钮
- Visual Studio引发空引用异常;忽略它.
- Visual Studio尚未受到更改的影响
- 重新启动Visual Studio;新实例应该更改了主题.
* 导入和删除导入的主题时出现问题:Could not load file or assembly 'Microsoft.VisualStudio.ExtensionManager, Version=12.0.0.0. ...
.首先,无法选择导入的主题.重新启动Visual Studio之后,您可以选择导入的主题.
*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.
这篇关于如何在VS2017预览中编辑(自定义)颜色主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!