ReSharper intermittently showing red errors for valid Razor code <p>When editing a CSHTML page, ReSharper is intermittedly showing some valid Razor syntax in red indicating an error. The syntax is red when I open the file, turns normal when I make an edit, then turns red again after a save:</p> <p><a href="https://i.stack.imgur.com/QciBg.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QciBg.gif" alt="ReSharper CSHTML error"></a></p> <p>Even when red, the code builds successfully and ReSharper even gives correct information about the syntax on hover:</p> <p><a href="https://i.stack.imgur.com/nG6OU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nG6OU.png" alt="enter image description here"></a> </p> <p>My environment is:</p> <ul> <li>ReSharper 10.0.2</li> <li>Visual Studio Enterprise 2015 Update 1</li> <li>ASP.NET 4.5</li> <li>MVC 5</li> </ul> <p>I have tried the solutions offered in other questions (e.g. <a href="http://stackoverflow.com/questions/15713167/resharper-can-not-resolve-symbol-even-when-project-builds">Resharper &quot;can not resolve symbol&quot; even when project builds</a>, <a href="http://stackoverflow.com/questions/29898607/resharper-is-suddenly-showing-red-for-razor-syntax">Resharper is suddenly showing red for Razor syntax</a>) like Suspending/Resuming ReSharper, clearing caches, etc. I even tried reinstalling ReSharper entirely but none of that helped.</p> <p>Potentially relevant (?) is that I recently installed MVC 3 and MVC 4 for other projects, but I have since uninstalled them again.</p> <p>Any suggestions for what might be causing this? Could it be a ReSharper bug somehow?</p> <p><strong>UPDATE:</strong></p> <p>This actually only happends when a ReSharper code cleanup is run and then a save is made. I had an extension which did this automatically on every save, but having disabled that the actual flow is:</p> <ul> <li>Make edits - <strong><em>OK</em></strong></li> <li>Save - <strong><em>OK</em></strong></li> <li>Clean up - <strong><em>OK</em></strong></li> <li>Save - <strong><em>RED</em></strong></li> </ul> <p>I am using the <em>Default: Full Cleanup</em> profile.</p>