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

前端 未结 18 2288
名媛妹妹
名媛妹妹 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条回答
  •  猫巷女王i
    2020-11-27 11:07

    I was getting similar error in VS2017 while trying to publish my solution to Azure.

    This algorithm helped me to resolve it:

    1. Close VS2017
    2. Open C:\Users{your user name}\AppData\Local\Microsoft\VisualStudio\ folder
    3. Rename 15.0_08edcd83 folder
    4. Start VS
    5. Publish works fine!

    Note that this will remove your Visual Studio's recent files / projects from it's history and also linking to MS account.

    This method is slightly different from the Top answer. Here you don't have to delete other folders except renaming abovementioned one.

提交回复
热议问题