ReSharper 5 for ASP.Net MVC中红色下划线突出显示的意义是什么? [英] What's the point of the red underline highlighting in ReSharper 5 for ASP.Net MVC?

查看:130
本文介绍了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:

  1. 安装ReSharper 6 +
  2. 在Visual Studio中,导航至ToolsOptionsEnvironmentFonts & Colors
  3. 向下滚动到ReSharper ASP.NET MVC *并将Item foreground颜色(如果需要,还可以选择Item background)更改为最适合的颜色.在您的特定情况下,您需要更改ReSharper ASP.NET MVC ViewItem foreground.
  1. Install ReSharper 6+
  2. Within Visual Studio navigate to ToolsOptionsEnvironmentFonts & Colors
  3. Scroll down to ReSharper ASP.NET MVC * and change the Item foreground color (and Item background if you'd like) to whatever color suits you best. In your specific case you'll want to change the Item foreground of ReSharper 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屋!

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