如何在 VS2017 Preview 中编辑(自定义)颜色主题 [英] How to edit (customize) Color Themes in VS2017 Preview

查看:10
本文介绍了如何在 VS2017 Preview 中编辑(自定义)颜色主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何在 VS2017 中更改颜色主题.

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

我在 2012 年和 2013 年晚些时候使用了一个自定义主题.我将它与扩展一起导入.但我也能够通过注册表将主题导入到 Express 版本,其中扩展未运行.

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

官方 VisualStudio 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.

不过,人们可能会在黑客攻击中找到用处 VSIX 文件 让旧的 Visual Studio 插件正常工作.因此,我将原始答案留在下面以供参考.

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.

通过一些黑客攻击,您 可以 安装 VS2015 颜色主题编辑器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 档案,打开其内容进行编辑(或解压缩并在编辑后重新压缩)(例如使用 7-Zip);
  • 编辑extension.vsixmanifest;

  • 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)"
  • 仅适用于 VS2013 颜色主题编辑器,用 DisplayName="Visual Studio Product Updates" 移除 Dependency 或将其更改为 Version="12.0.20827.3,16.0))

  • 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 是 15.0 版.方括号表示包含,圆括号表示排除.

通过 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 Preview 中编辑(自定义)颜色主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆