DLeh DLeh - 2 months ago 22
ASP.NET (C#) Question

Visual Studio 2015 not syntax highlighting razor nor Intellisense

My Razor views in VS2015 RC are not showing the proper coloring for C# code. My project was working fine in VS2013, but it isn't in 2015, and it's not giving me any Intellisense on the C# code. The solution builds and the site runs fine.

I tried the following to no avail


  • disabling all Visual Studio extensions

  • deleting my
    .suo
    file

  • removing the project and re-adding it to the solution



How can I fix this?

Example:


Answer

I've found in this answer another way to fix it without the devenv.exe /ResetUserData

Just delete the contents of this directory with Visual Studio closed: %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache