syntax highlighting in Visual Studio 2022 in cshtml files not working

52 views Asked by At

I am using Visual Studio 2022 on my working laptop and the syntax highlighting in .cshtml files does not work

Syntax not highlighted

which makes it hard to debug the code

HTML code usually is highlighted correctly

JS code is not higlighted at all

on my personal laptop same version of VS 17.7.7

What I tried

  • Deleting all bin, obj & .vs folders
  • Running .\devenv.exe /ResetUserData
  • Running .\devenv.exe /UpdateConfiguration & .\devenv.exe /ClearCache
  • Importing settings from my personal laptop
  • Exporting my settings from working laptop to personal one does not break the highlighting there
  • adding .cshtml files to be explicitely highlighted as JavaScript in the text editor settings

Has anyone experienced this ? I saw some posts about versions of VS 2015 and VS 2017 But unfortunately any of the fixes did not work for me

0

There are 0 answers