Partilhar via


BuildTask Class

Definition

This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

This class represents a single task.

public ref class BuildTask
public class BuildTask
type BuildTask = class
Public Class BuildTask
Inheritance
BuildTask

Remarks

Warning

This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.Construction Microsoft.Build.Evaluation Microsoft.Build.Execution

Properties

Condition

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Accessor for the task's "condition".

ContinueOnError

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Accessor for the task's "ContinueOnError".

HostObject

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Accessor for the "host object" for this task.

Name

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Accessor for the task's "name" element.

Type

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

System.Type object corresponding to the task class that implements the functionality that runs this task object.

Methods

AddOutputItem(String, String)

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Adds an Output tag to this task element

AddOutputProperty(String, String)

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Adds an Output tag to this task element

Execute()

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Runs the task associated with this object.

GetParameterNames()

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

This retrieves the list of all parameter names from the element node of this task. Note that it excludes anything that a specific property is exposed for or that isn't valid here (Name, Condition, ContinueOnError).

Note that if there are none, it returns string[0], rather than null, as it makes writing foreach statements over the return value so much simpler.

GetParameterValue(String)

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

This retrieves an arbitrary attribute from the task element. These are attributes that the project author has placed on the task element that have no meaning to MSBuild other than that they get passed to the task itself as arguments.

SetParameterValue(String, String, Boolean)

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

This sets an arbitrary attribute on the task element. These are attributes that the project author has placed on the task element that get passed in to the task.

This optionally escapes the parameter value so it will be treated as a literal.

SetParameterValue(String, String)

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

This sets an arbitrary attribute on the task element. These are attributes that the project author has placed on the task element that get passed in to the task.

Applies to