Visual Studio错误“未将对象引用设置为对象的实例"安装ASP.NET和Web Tools 2015之后 [英] Visual Studio error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015

查看:123
本文介绍了Visual Studio错误“未将对象引用设置为对象的实例"安装ASP.NET和Web Tools 2015之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装ASP.NET和Web工具2015(RC1更新1)后,打开*.cshtml文件时,我在ASP.NET MVC 4项目中收到以下错误:

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

即使我启动一个新的ASP.NET MVC 4项目并尝试在那里打开*.cshtml文件,我也会收到相同的错误消息.

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.

我正在使用Visual Studio 2015

I'm using Visual Studio 2015

推荐答案

也许有帮助:

  1. 从以下文件夹中删除内容:
  1. Delete the contents from the following folders:
  1. C:\ Users \%userprofile%\ AppData \ Local \ Microsoft \ VisualStudio
  2. C:\ Users \%userprofile%\ AppData \ Local \ Microsoft \ VSCommon

  • 有时,您需要转到:

  • Sometimes, you need to go to:

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

  • 并运行devenv /resetuserdata.

    预计,您的所有用户设置(例如Visual Studio布局,链接的Microsoft帐户或起始页)可能会消失.

    Expect, that all of your user settings such as Visual Studio layout, linked Microsoft account or start page might disappear.

    这篇关于Visual Studio错误“未将对象引用设置为对象的实例"安装ASP.NET和Web Tools 2015之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆