อ่านในภาษาอังกฤษ

แชร์ผ่าน


RequiredRuntimeAttribute Class

Definition

When marked with the RequiredRuntimeAttribute, a task indicates that it has stricter runtime requirements than a regular task - this tells MSBuild that it will need to potentially launch a separate process for that task if the current runtime does not match the version requirement. This attribute is currently non-functional since there is only one version of the CLR that is capable of running MSBuild v2.0 or v3.5 - the runtime v2.0

C#
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public sealed class RequiredRuntimeAttribute : Attribute
Inheritance
RequiredRuntimeAttribute
Attributes

Remarks

A task marked with the RequiredRuntimeAttribute indicates that it has a stricter runtime requirement than a regular task. It alerts MSBuild that it may need to start a separate process for the task if the current CLR runtime version does not match the required version.

หมายเหตุ

This attribute is currently non-functional because only one version of the CLR (2.0) is capable of running either MSBuild version 2.0 or 3.5.

For more information about using attributes, see Extending Metadata Using Attributes.

Constructors

RequiredRuntimeAttribute(String)

Constructor taking a version, such as "v2.0".

Properties

RuntimeVersion

Returns the runtime version the attribute was constructed with, e.g., "v2.0"

Applies to

ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1