ProjectTaskElement Class
.NET Framework 4.5
Represents a Task Element (MSBuild) in an MSBuild project.
System.Object
Microsoft.Build.Construction.ProjectElement
Microsoft.Build.Construction.ProjectElementContainer
Microsoft.Build.Construction.ProjectTaskElement
Microsoft.Build.Construction.ProjectElement
Microsoft.Build.Construction.ProjectElementContainer
Microsoft.Build.Construction.ProjectTaskElement
Namespace: Microsoft.Build.Construction
Assembly: Microsoft.Build (in Microsoft.Build.dll)
The ProjectTaskElement type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AllChildren | Gets a recursive depth-first enumerator over all child elements. (Inherited from ProjectElementContainer.) |
![]() | AllParents | All parent elements of this element, going up to the ProjectRootElement. None if this is a ProjectRootElement. None if this has not been attached to a parent yet. (Inherited from ProjectElement.) |
![]() | Children | Gets all child elements. (Inherited from ProjectElementContainer.) |
![]() | ChildrenReversed | Gets all child elements, starting from the last child. (Inherited from ProjectElementContainer.) |
![]() | Condition | Gets or sets the Condition value. It will return empty string IFF a condition attribute is legal but it’s not present or has no value. It will return null IFF a Condition attribute is illegal on that element. Removes the attribute if the value to set is empty. It is possible for derived classes to throw an InvalidOperationException if setting the condition is not applicable for those elements. (Inherited from ProjectElement.) |
![]() | ConditionLocation | Location of the "Condition" attribute on this element, if any. If there is no such attribute, returns null. (Inherited from ProjectElement.) |
![]() | ContainingProject | ProjectRootElement (possibly imported) that contains this Xml. Cannot be null. (Inherited from ProjectElement.) |
![]() | ContinueOnError | Gets or sets the ContinueOnError attribute value. |
![]() | ContinueOnErrorLocation | Location of the "ContinueOnError" attribute on this element, if any. If there is no such attribute, returns null; |
![]() | Count | Gets the number of child elements. (Inherited from ProjectElementContainer.) |
![]() | FirstChild | Gets the first child element. (Inherited from ProjectElementContainer.) |
![]() | Label | Gets or sets the Label value. Returns empty string if it is not present. Removes the attribute if the value to set is empty. (Inherited from ProjectElement.) |
![]() | LabelLocation | Location of the "Label" attribute on this element, if any. If there is no such attribute, returns null; (Inherited from ProjectElement.) |
![]() | LastChild | Gets the last child element. (Inherited from ProjectElementContainer.) |
![]() | Location | Location of the corresponding Xml element. May not be correct if file is not saved, or file has been edited since it was last saved. In the case of an unsaved edit, the location only contains the path to the file that the element originates from. (Inherited from ProjectElement.) |
![]() | MSBuildArchitecture | Gets or sets the architecture value for the task. Returns empty string if it is not present. Removes the attribute if the value to set is empty. |
![]() | MSBuildArchitectureLocation | Location of the "MSBuildArchitecture" attribute on this element, if any. If there is no such attribute, returns null; |
![]() | MSBuildRuntime | Gets or sets the runtime value for the task. Returns empty string if it is not present. Removes the attribute if the value to set is empty. |
![]() | MSBuildRuntimeLocation | Location of the "MSBuildRuntime" attribute on this element, if any. If there is no such attribute, returns null; |
![]() | Name | Gets the name of this task. |
![]() | NextSibling | Next sibling element. May be null. (Inherited from ProjectElement.) |
![]() | Outputs | Gets all Output Element (MSBuild) children. |
![]() | ParameterLocations | Enumerable over the locations of parameters on the task. Condition and ContinueOnError, which have their own properties, are not included in this collection. If parameters differ only by case only the last one will be returned. Hosts can still remove the other parameters by using RemoveAllParameters(). |
![]() | Parameters | Gets all unevaluated parameters of this task. |
![]() | Parent | Null if this is a ProjectRootElement. Null if this has not been attached to a parent yet. (Inherited from ProjectElement.) |
![]() | PreviousSibling | Previous sibling element. May be null. (Inherited from ProjectElement.) |
| Name | Description | |
|---|---|---|
![]() | AddOutputItem(String, String) | Adds an Output item after the last child. |
![]() | AddOutputItem(String, String, String) | Adds a conditioned Output item to this task after the last child. |
![]() | AddOutputProperty(String, String) | Adds an Output property to this task after the last child. |
![]() | AddOutputProperty(String, String, String) | Adds a conditioned Output property to this task after the last child. |
![]() | AppendChild | Appends the child element as the last child of this project container. (Inherited from ProjectElementContainer.) |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetParameter | Gets the value of the parameter with the specified name. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InsertAfterChild | Inserts the child element after the reference element. (Inherited from ProjectElementContainer.) |
![]() | InsertBeforeChild | Inserts the child element before the reference element. (Inherited from ProjectElementContainer.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | PrependChild | Prepends the child element as the first child of this project container. (Inherited from ProjectElementContainer.) |
![]() | RemoveAllChildren | Removes all the children, if any, from this project container. (Inherited from ProjectElementContainer.) |
![]() | RemoveAllParameters | Removes all parameters from the task. Does not remove any ContinueOnError and/or Condition attributes. |
![]() | RemoveChild | Removes a child element from this project container. (Inherited from ProjectElementContainer.) |
![]() | RemoveParameter | Removes any parameter on this task with the specified name. If no parameter by that name exists in the task, does nothing. |
![]() | SetParameter | Updates or adds a parameter on this task |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


