开发者

What happens if I don't specify targetFramework="4.0"?

In my ASP.N开发者_如何学运维et 4.0 web.config I had the following attribute:

<compilation targetFramework="4.0">

If I remove the targetFramework attribute, everything appears to carry on as normal. Under what circumstances does this attribute help me?


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.

So basically if your application pool in IIS targets ASP.NET 4.0 and you omit this attribute nothing happens => your site still uses .NET 4.0

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜