Visual Studio error “Object reference not set to an instance of an object” after install of ASP.NET and Web Tools 2015

前端 未结 18 2191
名媛妹妹
名媛妹妹 2020-11-27 10:37

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:

相关标签:
18条回答
  • 2020-11-27 10:56

    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.

    0 讨论(0)
  • 2020-11-27 10:58

    Delete %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache and restart Visual Studio.

    Alternatively, use the Clear MEF Component Cache extension.

    0 讨论(0)
  • 2020-11-27 10:58

    The solution to the issue when i had this earlier today was that there was an additional set of tags bolted on the end of my Web.config. Once removed the functionality returned.

    0 讨论(0)
  • 2020-11-27 10:59

    For me,

    1. I ended the process in Windows Task Manager: VsHub.exe.
    2. Restarted Visual Studio.

    After that, everything works like a charm again!

    0 讨论(0)
  • 2020-11-27 10:59

    I was getting an exception every time I tried to create a "new" project.

    My solution was:

    1. Go menu ToolsExtensions and Updates

    2. Check the "Updates" link... There was an update to Microsoft ASP.NET and Web Tools. Install it.

    That fixed it for me.

    0 讨论(0)
  • 2020-11-27 11:00

    After trying the top answer, I found that you must also restart the computer. The error may be part of a git issue as well where restarting your computer will reset.

    0 讨论(0)
提交回复
热议问题