PROBLEM
You double-click a .cshtml file in Visual Studio 2015 and you get an error “Object reference not set to an instance of an object”.
SOLUTION
- Close Visual Studio
- Delete all files in the folder %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
- Re-open Visual Studio
- You should now be able to open your .cshtml file