ASP.NET .cshtml colors not working (even if changing theme)

Answered

Hello everyone, good morning.

I'm using Rider with an Asp.Net MVC 5 project. It's all working pretty well except for the .cshtml files.

No matter what i do or change in the settings the HTML and Razor syntax are not getting highlighted.

I'm using Visual Studio Light Theme.

See picture bellow:

It is like i'm on Windows Notepad, with no styling at all :(

The intellisense is working fine, i just need to fix this color issue.

Any help would be appreciated.

Thanks!

5 comments

Hi Rafael,

Do you have a pause icon on the editor's top-right corner? If so, what does the message say?

0

Hi Julia,

Yes, there is a pause icon.

Here's a picture of what it says:

And when i right-click it, the following appears:

Thanks!

 

0

Hello guys, 

I have same problem, what is the solution?

0

Hi everyone,

Sorry for being silent. If you see the OFF or pause sign in the top-right corner then it means that all highlightings have been turned off for your files.
There can be several reasons for that:

  1. Those files/folders are excluded from code analysis via "Elements to skip" on "File | Settings | Editor | Inspection Settings"
  2. The code analysis is disabled completely in "File | Settings | Editor | Inspection Settings"
  3. The project is opened as a folder, not as a solution. Please make sure you use "File -> Open -> Solution or Project"
  4. The file size is too big. To enable code analysis for the particular file, right-click on OFF in the top-right corner of the editor, select "Customize highlighting level", and pull the scroll indicator to "Inspections"

Hope it helps!

0

Please sign in to leave a comment.