Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio 2017 cshtml syntax highlighting not working

I have been using VS 2015 for quite some time and just moved to 2017 recently. My cshtml text is all one color (black) and I have been trying to figure out why they are not highlighting like my other file types. Any ideas? This is pretty frustrating as I have been through different settings and many posts looking for an answer. I must be missing something.

like image 628
Dean Friedland Avatar asked May 19 '17 13:05

Dean Friedland


2 Answers

Select all (Ctrl+A) and Copy(Ctrl+C) everything in the .cshtml file. Delete everything! Save (Ctrl+S) the empty file. Then paste (Ctrl+P). Worked for me!

like image 66
Zolisa Welani Avatar answered Nov 04 '22 06:11

Zolisa Welani


The repair tip actually worked. I was not aware that you could repair your instance... Thank you for the help!

To repair, go to "Programs and Features", select "Microsoft Visual Studion 2017" and choose "Change". The Repair option is shown here:

enter image description here

like image 3
Dean Friedland Avatar answered Nov 04 '22 06:11

Dean Friedland