.Net Core tag helper intellisense and color coding not working

This is a semi-old Q&A, but I recently solved a similar problem where tag helper intellisense and highlighting/colorization suddenly stopped working, so I post this for posterity.

I tried to repair and reinstall Visual Studio to no avail. What ultimately solved this issue follows:

  1. Close all instances of Visual Studio.

  2. Download and install the latest .NET Core SDK.

  3. Open "Apps & features" (Add or remove programs)

  4. Search for ".NET Core SDK" and uninstall all except the latest version (x64 and/or x86).

  5. Reopen Visual Studio.


I fixed it in two steps.

1.Install Razor tool from package manager console. It is pre-release for now

Install-Package Microsoft.AspNetCore.Razor.Tools –Pre
  1. Download and install Razor Language Services from marketplace. (Your visual studio instance should be closed)

After restart visual studio, intellisense and coloring should be working for tag helpers.

enter image description here