0

Is it normal that Razor doesn't highlighting syntax of C# when also is JavaScript?

Here is screen of my example

I can't even debug the code of C#. In the other view where is only C#, HTML and CSS everything is all right.

Thanks for any response!

Piotr Podyma
  • 11
  • 1
  • 2
  • 6
  • It looks like your Razor _is not_ being highlighted and the javascript **is** – maccettura Oct 09 '17 at 17:24
  • Here is solution to this problem https://stackoverflow.com/questions/30311355/visual-studio-2015-not-syntax-highlighting-razor-nor-intellisense – Liaqat Saeed Oct 09 '17 at 17:25
  • If resetuserdata not work, tried to put a cursor on it. in some case it's load when you put pointer on the code. – Anirudha Gupta Oct 09 '17 at 17:28
  • Possible duplicate of [Visual Studio 2015 not syntax highlighting razor nor Intellisense](https://stackoverflow.com/questions/30311355/visual-studio-2015-not-syntax-highlighting-razor-nor-intellisense) – Dour High Arch Oct 09 '17 at 18:54
  • I didn't add, but it is Visual Studio 2017 and I can't find devenv.exe /ResetUserData – Piotr Podyma Oct 10 '17 at 10:24

1 Answers1

0

ResetUserData didn't help.

I found the different solution and it works for me:

Opening the same project as a "Web Site" (File > Open > Web Site) fixes the issue.

Piotr Podyma
  • 11
  • 1
  • 2
  • 6