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

在我的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 ta

在我的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

作者: dawei

【声明】:西安站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部