Configuration.TargetFramework Property

.NET Framework (current version)
 

Specifies the targeted version of the .NET Framework when a version earlier than the current one is targeted.

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

Public Property TargetFramework As FrameworkName

Property Value

Type: System.Runtime.Versioning.FrameworkName

The name of the targeted version of the .NET Framework. The default value is null, which indicates that the current version is targeted.

When the configuration system serializes a hierarchy of configuration objects to XML, it checks the value of this property. If the property is not null, the configuration system performs version checks for each configuration section group and configuration section. The configuration system also performs version checks for individual configuration properties that are marked as having changed across versions. (For more information, see ConfigurationPropertyOptions.) The configuration system also performs version checks for configuration elements in configuration sections.

If the value of this property is null, the configuration system does not perform any version checks during serialization.

.NET Framework
Available since 4.0
Return to top
Show: