Today I was looking at the new feature Microsoft announced a few weeks ago that Xamarin is now in Visual Studio by default. After working with it for a few hours I had to go back and make some changes to one of our web mvc projects. At that moment I saw that I did not have anymore Razor Intellisense in Visual Studio. The first thing I tried was restarting Visual Studio, but no effect. So I opened different web project to see if Razor Intellisense was working their, but also broken. So I went online and tried to find an answer.

The first answer I found  on Stack Overflow was resetting the Visual Studio user data.

devenv.exe /resetuserdata

Running the above command line did not work because I got the following error:

'devenv.exe' is not recognized as an internal or external command, operable program or batch file.

After trying to get the command line to run with continued failure I decided to look further and find a different solution. And the solution I found which worked for me was following the steps below:

  1. Close Visual Studio
  2. Find the cache folder:  %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
  3. Delete the contents
  4. Restart Visual Studio
  5. Open a Razor file and check Intellisense.