After installing the ASP.NET and Web Tools 2015 (RC1 update 1) I get the following error within ASP.NET MVC 4 projects when opening *.cshtml
files:
Object reference not set to instance of an object
I get the same error message even if I start a new ASP.NET MVC 4 project and try to open a *.cshtml
file there.
I'm using Visual Studio 2015
Goto windows+R and type %temp% and hit enter. delete the temp folder and files and then try opening the same
I solved it doing
in this path:
I assume that in x86 it works in this path:
Maybe this helps:
and run
devenv /resetuserdata
.Expect, that all of your user settings such as Visual Studio layout, linked Microsoft account or start page might disappear.
Delete bin and obj folders in all projects of that solution.
Seems like those folders were having old files generated by some older version of visual studio, which are not compatible with new version of visual studio.
I was getting this exception every time I created a "new" project.
My solution was:
That fixed it for me.
Unfortunately, I ran into another exception:
I disabled the
FIPS
setting EnabledDWORD
value to zero.For me,
VsHub.exe
.After that, everything works like a charm again!