[英]ReSharper intermittently showing red errors for valid Razor code
When editing a CSHTML page, ReSharper is intermittedly showing some valid Razor syntax in red indicating an error.编辑 CSHTML 页面时,ReSharper 会间歇性地以红色显示一些有效的 Razor 语法,表示有错误。 The syntax is red when I open the file, turns normal when I make an edit, then turns red again after a save:打开文件时语法为红色,编辑时变为正常,保存后再次变为红色:
Even when red, the code builds successfully and ReSharper even gives correct information about the syntax on hover:即使在红色时,代码也能成功构建,ReSharper 甚至会在悬停时提供有关语法的正确信息:
My environment is:我的环境是:
I have tried the solutions offered in other questions (eg ReSharper "can not resolve symbol" even when project builds , Resharper is suddenly showing red for Razor syntax ) like Suspending/Resuming ReSharper, clearing caches, etc. I even tried reinstalling ReSharper entirely but none of that helped.我已经尝试了其他问题中提供的解决方案(例如, 即使在项目构建时 ReSharper“无法解析符号” , Resharper 突然为 Razor 语法显示红色),例如暂停/恢复 ReSharper、清除缓存等。我什至尝试完全重新安装 ReSharper,但是这些都没有帮助。
Potentially relevant (?) is that I recently installed MVC 3 and MVC 4 for other projects, but I have since uninstalled them again.潜在相关 (?) 是我最近为其他项目安装了 MVC 3 和 MVC 4,但此后我又卸载了它们。
Any suggestions for what might be causing this?关于可能导致这种情况的任何建议? Could it be a ReSharper bug somehow?不知何故,它可能是 ReSharper 的错误吗?
UPDATE:更新:
This actually only happends when a ReSharper code cleanup is run and then a save is made.这实际上仅在运行 ReSharper 代码清理然后进行保存时才会发生。 I had an extension which did this automatically on every save, but having disabled that the actual flow is:我有一个扩展,它在每次保存时自动执行此操作,但禁用了实际流程:
I am using the Default: Full Cleanup profile.我正在使用默认值:完全清理配置文件。
This appears to be a symptom of a known ReSharper bug, due to be fixed in version 10.1这似乎是已知的 ReSharper 错误的症状,由于在 10.1 版中已修复
See https://youtrack.jetbrains.com/issue/RSRP-455788请参阅https://youtrack.jetbrains.com/issue/RSRP-455788
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.