Share via


RequiredRuntimeAttribute Class

Defines the metadata attribute that task authors use to identify whether the task requires a specific version of the CLR runtime.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Inheritance Hierarchy

System.Object
  System.Attribute
    Microsoft.Build.Framework.RequiredRuntimeAttribute

Namespace:  Microsoft.Build.Framework
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False, Inherited := False)> _
Public NotInheritable Class RequiredRuntimeAttribute _
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class RequiredRuntimeAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = false, Inherited = false)]
public ref class RequiredRuntimeAttribute sealed : public Attribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = false)>]
type RequiredRuntimeAttribute =  
    class 
        inherit Attribute 
    end
public final class RequiredRuntimeAttribute extends Attribute

The RequiredRuntimeAttribute type exposes the following members.

Constructors

  Name Description
Public method RequiredRuntimeAttribute Initializes a new instance of the RequiredRuntimeAttribute class.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Top

Properties

  Name Description
Public property RuntimeVersion Gets the CLR runtime version the attribute was constructed with, such as "v2.0."MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property TypeId (Inherited from Attribute.)

Top

Methods

  Name Description
Public method Equals (Inherited from Attribute.)
Public method GetHashCode (Inherited from Attribute.)
Public method GetType (Inherited from Object.)
Public method IsDefaultAttribute (Inherited from Attribute.)
Public method Match (Inherited from Attribute.)
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#GetIDsOfNames (Inherited from Attribute.)
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#GetTypeInfo (Inherited from Attribute.)
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#GetTypeInfoCount (Inherited from Attribute.)
Explicit interface implemetationPrivate method System#Runtime#InteropServices#_Attribute#Invoke (Inherited from Attribute.)

Top

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Build.Framework Namespace