Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TargetFramework Property

HttpRuntime.TargetFramework Property

.NET Framework 4.6 and 4.5

Gets the version of the .NET Framework that the current web application targets.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

public static Version TargetFramework { get; }

Property Value

Type: System.Version
The version of the .NET Framework that the current web application targets.

This property is normally set by using the targetFramework attribute of the httpRuntime element in the Web.config file.

This property is not guaranteed to return a correct value if the currentapplication domain is not an ASP.NET application domain.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft