Configuration.TargetFramework Configuration.TargetFramework Configuration.TargetFramework Configuration.TargetFramework Property

定义

在将当前版本之前的某个版本作为目标时,指定 .NET Framework 的目标版本。Specifies the targeted version of the .NET Framework when a version earlier than the current one is targeted.

public:
 property System::Runtime::Versioning::FrameworkName ^ TargetFramework { System::Runtime::Versioning::FrameworkName ^ get(); void set(System::Runtime::Versioning::FrameworkName ^ value); };
public System.Runtime.Versioning.FrameworkName TargetFramework { get; set; }
member this.TargetFramework : System.Runtime.Versioning.FrameworkName with get, set
Public Property TargetFramework As FrameworkName

属性值

.NET Framework 的目标版本的名称。The name of the targeted version of the .NET Framework. 默认值为 null,它指示将当前版本作为目标。The default value is null, which indicates that the current version is targeted.

注解

当配置系统将配置对象的层次结构序列化为 XML 时,它将检查该属性的值。When the configuration system serializes a hierarchy of configuration objects to XML, it checks the value of this property. 如果属性不null为,则配置系统会对每个配置节组和配置节执行版本检查。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. (有关详细信息,请参阅 ConfigurationPropertyOptions。)配置系统还对配置节中的配置元素执行版本检查。(For more information, see ConfigurationPropertyOptions.) The configuration system also performs version checks for configuration elements in configuration sections.

如果此属性的值为null,则在序列化过程中,配置系统不执行任何版本检查。If the value of this property is null, the configuration system does not perform any version checks during serialization.

适用于

另请参阅