共用方式為


BuildTask.SetParameterValue Method

Definition

Sets the value of the specified task parameter.

Overloads

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.

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)

Source:
BuildTask.cs

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.

public:
 void SetParameterValue(System::String ^ parameterName, System::String ^ parameterValue);
public void SetParameterValue (string parameterName, string parameterValue);
member this.SetParameterValue : string * string -> unit
Public Sub SetParameterValue (parameterName As String, parameterValue As String)

Parameters

parameterName
String

The parameter name to set.

parameterValue
String

The value to assign to parameterName.

Remarks

Warning

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

Applies to

SetParameterValue(String, String, Boolean)

Source:
BuildTask.cs

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.

public:
 void SetParameterValue(System::String ^ parameterName, System::String ^ parameterValue, bool treatParameterValueAsLiteral);
public void SetParameterValue (string parameterName, string parameterValue, bool treatParameterValueAsLiteral);
member this.SetParameterValue : string * string * bool -> unit
Public Sub SetParameterValue (parameterName As String, parameterValue As String, treatParameterValueAsLiteral As Boolean)

Parameters

parameterName
String
parameterValue
String
treatParameterValueAsLiteral
Boolean

Remarks

Warning

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

Applies to