Microsoft.Build.Framework.RequiredAttribute Class

Defines the metadata attribute that task authors use to identify required task properties. Task properties with this attribute must have a set value when the task is run.

See Also: RequiredAttribute Members


[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
public sealed class RequiredAttribute : Attribute


If a property marked with this attribute is not assigned a value when the task is invoked, the build will fail.

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


Namespace: Microsoft.Build.Framework
Assembly: Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)
Assembly Versions:
Since: 2.0