加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 如果我没有指定targetFramework =“4.0”会发生什么

发布时间:2020-12-15 20:19:45 所属栏目:asp.Net 来源:网络整理
导读:在我的ASP.Net 4.0 web.config我有以下属性: compilation targetFramework="4.0" 如果我删除targetFramework属性,一切似乎正常进行.这个属性在什么情况下帮助我? 解决方法 Quote from the doc: Specifies the version of the .NET Framework that the Web
在我的ASP.Net 4.0 web.config我有以下属性:
<compilation targetFramework="4.0">

如果我删除targetFramework属性,一切似乎正常进行.这个属性在什么情况下帮助我?

解决方法

Quote from the doc:

Specifies the version of the .NET
Framework that the Web site targets.

The default is Null.

If this attribute is omitted,the
target version is determined by other
settings in the Web.config file and by
the IIS application pool that the Web
site is associated with. For more
information,see
CompilationSection.TargetFramework and
.NET Framework Multi-Targeting for
ASP.NET Web Projects.

所以基本上如果你的应用程序池在IIS中的目标ASP.NET 4.0和你省略这个属性什么也没有发生=>您的网站仍然使用.NET 4.0

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读