gpt4 book ai didi

asp.net - 在 Visual Studio 2013 中打开 cshtml 文件时未将对象引用设置为对象的实例

转载 作者:行者123 更新时间:2023-12-04 11:18:12 35 4
gpt4 key购买 nike

当我尝试在 Visual Studio 2013 中打开 .cshtml 文件时,出现此错误:

enter image description here

Object reference not set to an instance of an object

我已经尝试了给出的解决方案 here但它没有用。
这是我在 web.config 中的 appsettings 部分:
<appSettings>
<add key="Port" value="25" />
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>

我不认为问题出在这个特定的项目上,因为我所有的其他 MVC 项目都有同样的问题。

最佳答案

我在 Visual Studio 2015 中遇到了完全相同的问题。

我通过删除 %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache 中的所有文件解决了它

(我认为 14.0 文件夹因安装的 VS 版本而异。

关于asp.net - 在 Visual Studio 2013 中打开 cshtml 文件时未将对象引用设置为对象的实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29959210/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com