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

前端 未结 18 2188
名媛妹妹
名媛妹妹 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:43

    I have been fighting with this during the whole weekend. But it's pretty easy to do it. What I did was to click on repair rather than uninstall. After repairing, I clicked on restart directly. After that, everything is working perfectly. You should try this, may be it can work also for you!!!

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

    In my case (not necessarily be the solution for you, but it may be helpful for someone), the solution was:

    1. Go menu ToolsExtensions and Updates

    2. Select the Online tab from the right panel

    3. Search for the words web tools, and then select Microsoft ASP.NET and Web Tools and install it.

    In my case, this was missing from my computer because of a lot of repairing operations for Visual Studio.

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

    Goto windows+R and type %temp% and hit enter. delete the temp folder and files and then try opening the same

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

    Restarting Visual Studio did it for me. On the next run, it displayed a "Scanning new and updated MEF components ..." and then it executed normally.

    It seems to be related to Windows update somehow, although I don't have proof.

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

    I solved it doing

    run devenv /resetuserdata
    

    in this path:

    [x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
    

    I assume that in x86 it works in this path:

    [x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE
    
    0 讨论(0)
  • 2020-11-27 10:52

    For me, ASP.NET 5 is not yet required, I removed update, and then reinstalled ASP.NET 4.5. It's a bit tricky:

    1. Removed from control panel "Microsoft ASP.NET 5 RC1 Update1". After that, you will no longer open ASP.NET MVC projects
    2. Then I changed the installation of "Microsoft Visual Studio Professional 2015", clicked "Modify", and selected "Microsoft Web Developer Tools"

    No longer follow the notification of update in Visual Studio 2015!!!

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