如何让用户类型 C# 语法突出显示在 VS 2012 RC 中再次工作? [英] How can I get user type C# syntax highlighting working again in VS 2012 RC?
问题描述
不知何故,我为 C# 代码突出显示的部分语法在 VS 2012 IDE 中消失了.卸载、重新启动和重新安装什么都不做,也不会重置选项对话框中的颜色.
Somehow part of my syntax highlighting for C# code has disappeared in the VS 2012 IDE. Uninstalling, rebooting, and reinstalling does nothing, nor does resetting the colors in the options dialog.
以下是一些全部显示为默认(黑色)的项目示例,这些项目通常具有颜色,但通常没有:
Here are some examples of items which all appear in default (black) that normally have color which don't:
- 属性
- 系统类
- 我自己的课程
这里有一些仍然有颜色的关键字:
And here are some keywords that still have color:
- 使用
- 公开
- 无效
- 变量
- 为了
有其他人遇到过这种情况并设法解决了吗?
Has anyone else experienced this and managed to fix it?
推荐答案
这里有一个简单的解决方案.转到devenv
所在的目录(对于2012 RC),然后键入devenv.exe/setup
.它将解决您的问题.
Here is a simple solution. Go to the directory where devenv
is (for 2012 RC), and type devenv.exe /setup
. It will fix your problem.
devenv.exe
通常位于 C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDE
之类的位置.
devenv.exe
is usually in something like C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDE
.
建议您从 Visual Studio 命令提示符(开始>Microsoft Visual Studio>工具>Visual Studio 命令提示符)执行此操作,和/或确保您的命令提示符已管理员权限.
It has been suggested that you do this from the Visual Studio command prompt (Start>Microsoft Visual Studio>Tools>Visual Studio Command Prompt), and/or make sure your command prompt has administrator permissions.
其他人注意:这很有可能适用于许多其他版本的 Visual Studio,包括 2008、2010、11 测试版,......
Note for others: This has a very good chance of working for many other versions of Visual Studio, including 2008, 2010, 11 beta, ...
这篇关于如何让用户类型 C# 语法突出显示在 VS 2012 RC 中再次工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!