Carsten Cors Carsten Cors - 4 months ago 153
ASP.NET (C#) Question

Visual Studio 2015 error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015 (RC1 Update 1)

After installing the ASP.NET and Web Tools 2015 (RC1 update 1) I get the following error within MVC 4 projects when opening

*.cshtml
files:


Object reference not set to instance of an object


enter image description here

I get the same error message even if I start a new MVC 4 project and trys to open a
*.cshtml
file there.

Fka Fka
Answer

Maybe this helps:

  1. Delete the contents from the following folders:
    1. C:\Users\{user}\AppData\Local\Microsoft\VisualStudio
    2. C:\Users\{user}\AppData\Local\Microsoft\VSCommon
  2. Sometimes, you need to go to:
    1. [x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
    2. [x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE

and run devenv /resetuserdata.

Expect, that all of your user settings such as Visual Studio layout, linked Microsoft account or start page dissapear.