Partager via


ProjectTaskElement.SetParameter Method

Updates or adds a parameter on this task

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.

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

Syntax

'Declaration
Public Sub SetParameter ( _
    name As String, _
    unevaluatedValue As String _
)
public void SetParameter(
    string name,
    string unevaluatedValue
)
public:
void SetParameter(
    String^ name, 
    String^ unevaluatedValue
)
member SetParameter : 
        name:string * 
        unevaluatedValue:string -> unit
public function SetParameter(
    name : String, 
    unevaluatedValue : String
)

Parameters

  • name
    Type: System.String

    The name of the parameter to update or add.

  • unevaluatedValue
    Type: System.String

    The value of the parameter.

Remarks

Updates the parameter to the specified value if a parameter by that name exists in the task. Otherwise, creates a parameter with the specified name and value, and adds it to the task.

.NET Framework Security

See Also

Reference

ProjectTaskElement Class

Microsoft.Build.Construction Namespace