ReSharper 5 for ASP.Net MVC中红色下划线突出显示的意义是什么? [英] What's the point of the red underline highlighting in ReSharper 5 for ASP.Net MVC?
问题描述
我最近升级为使用ReSharper 5(当前为Beta).我注意到在ASP.Net MVC项目中,ReSharper用红色强调了控制器内的所有return语句:
I recently upgraded to using ReSharper 5 (currently in beta). I noticed that in ASP.Net MVC projects, ReSharper underlines in red all of the return statements inside a controller:
我个人觉得这很烦人,因为它看起来像是一个错误.单击带下划线的文本不会提供任何帮助(例如,灯泡).我没有看到在Environment -> Fonts and Colors
中更改此文本样式的选项,到目前为止,看起来似乎唯一的禁用方法是取消选中ASP.Net -> Other
中的启用ASP.Net MVC引用"重新整理选项.
I personally find this pretty annoying because it looks like an error. Clicking on the underlined text doesn't offer any help (ie, a lightbulb). I don't see an option to change the styling of this text in Environment -> Fonts and Colors
, and so far it looks like the only way to disable it is to un-check the "Enable ASP.Net MVC References" in the ASP.Net -> Other
Re-Sharper options.
此突出显示的意义是什么?我是否错过了ReSharper为我提供的特殊服务?有没有办法在仍然在ReSharper中启用MVC支持的同时删除突出显示?
推荐答案
它不是红色-它是棕色.它与标准VS配色方案中的字符串文字的颜色匹配.
It's not red - it's brown. It matches color of string literals in standard VS color scheme.
要更改其颜色,请执行以下操作:
To change it's color:
- 安装ReSharper 6 +
- 在Visual Studio中,导航至
Tools
→Options
→Environment
→Fonts & Colors
- 向下滚动到
ReSharper ASP.NET MVC *
并将Item foreground
颜色(如果需要,还可以选择Item background
)更改为最适合的颜色.在您的特定情况下,您需要更改ReSharper ASP.NET MVC View
的Item foreground
.
- Install ReSharper 6+
- Within Visual Studio navigate to
Tools
→Options
→Environment
→Fonts & Colors
- Scroll down to
ReSharper ASP.NET MVC *
and change theItem foreground
color (andItem background
if you'd like) to whatever color suits you best. In your specific case you'll want to change theItem foreground
ofReSharper ASP.NET MVC View
.
如果在第三步中找不到ReSharper项,则应通过删除注册表中的HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\FontAndColors\Cache
键来手动重置Fonts & Colors
缓存(您可能也必须删除位于...\10.0\...
中的键) )
If at the third step you can't find the ReSharper items you should reset the Fonts & Colors
cache manually by deleting the HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\FontAndColors\Cache
key in the registry (You may have to delete the key located in ...\10.0\...
, too.)
这篇关于ReSharper 5 for ASP.Net MVC中红色下划线突出显示的意义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!