Compartir a través de


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

public ref class RequiredRuntimeAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public sealed class RequiredRuntimeAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)>]
type RequiredRuntimeAttribute = class
    inherit Attribute
Public NotInheritable Class RequiredRuntimeAttribute
Inherits 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.

Note

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