对 Visual Studio 中的Resharper禁用对某种文件的检测

原因:在Visual Studio中安装Reshaper后,就会对各种文件进行代码检测,但是因为Reshaper更新的速度不是很及时,所以有时会对Visual Studio中某些新功能误断,导致Coding时各种红哗哗的错误

例如:

   

   

   

因为Reshpaer对Razor中inject标识的误判,所以各种提示错误,这时可以想到的就是单独对cshtml关闭Reshaper

具体操作如下

菜单>Reshaper>Options…

然后展开Code Inspection

Elements to skip中的File masks中添加*.cshtml

   

   

这样在再次打开cshtml文件时就不会受到Reshaper的影响了

   

原文地址:https://www.cnblogs.com/chsword/p/visualstudio_disable_resharper_code_inspection.html