如何指定我在.cshtml文件中使用的ASP.NET版本?当我没有网页浏览器抱怨它时,当我去microsofts页面查看问题时,我创建了一个带文本的web.config文件
<?xml version="1.0"?>
<appsettings>
<add key="webPages:Version" value="2.0" />
</appsettings>
</configuration>
就像他们说我应该,现在它说我的代码有错误。 说我错过了线上的部分声明。
完整的web.config文件:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0" />
</system.web>
<appsettings>
<add key="webPages:Version" value="2.0" />
</appsettings>
</configuration>