Project.SetProperty Method

Definition

Sets the value of the specified property.

Overloads

SetProperty(String, String)

Sets the value of the specified property.

SetProperty(String, String, String)

Sets the value of the specified property.

SetProperty(String, String, String, PropertyPosition)

Sets the value of the specified property.

SetProperty(String, String, String, PropertyPosition, Boolean)

Sets the value of the specified property.

SetProperty(String, String)

Sets the value of the specified property.

public:
 void SetProperty(System::String ^ propertyName, System::String ^ propertyValue);
public void SetProperty (string propertyName, string propertyValue);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void SetProperty (string propertyName, string propertyValue);
member this.SetProperty : string * string -> unit
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.SetProperty : string * string -> unit
Public Sub SetProperty (propertyName As String, propertyValue As String)

Parameters

propertyName
String

The name of the property to change.

propertyValue
String

The value to assign the property.

Attributes

Applies to

SetProperty(String, String, String)

Sets the value of the specified property.

public:
 void SetProperty(System::String ^ propertyName, System::String ^ propertyValue, System::String ^ condition);
public void SetProperty (string propertyName, string propertyValue, string condition);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void SetProperty (string propertyName, string propertyValue, string condition);
member this.SetProperty : string * string * string -> unit
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.SetProperty : string * string * string -> unit
Public Sub SetProperty (propertyName As String, propertyValue As String, condition As String)

Parameters

propertyName
String

The name of the property to change.

propertyValue
String

The value to assign the property.

condition
String

The condition to use on the property. Corresponds to the Condition attribute of the Property element.

Attributes

Applies to

SetProperty(String, String, String, PropertyPosition)

Sets the value of the specified property.

public:
 void SetProperty(System::String ^ propertyName, System::String ^ propertyValue, System::String ^ condition, Microsoft::Build::BuildEngine::PropertyPosition position);
public void SetProperty (string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.PropertyPosition position);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void SetProperty (string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.PropertyPosition position);
member this.SetProperty : string * string * string * Microsoft.Build.BuildEngine.PropertyPosition -> unit
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.SetProperty : string * string * string * Microsoft.Build.BuildEngine.PropertyPosition -> unit
Public Sub SetProperty (propertyName As String, propertyValue As String, condition As String, position As PropertyPosition)

Parameters

propertyName
String

The name of the property to change.

propertyValue
String

The value to assign the property.

condition
String

The condition to use on the property. Corresponds to the Condition attribute of the Property element.

position
PropertyPosition

A PropertyPosition value indicating the location to insert the property.

Attributes

Remarks

SetProperty is called from the integrated development environment (IDE) to set a particular property at the project level. This method searches the existing property groups for a property with this name. If one is found, it changes its value. Otherwise, it either adds a new property to that property group, or adds a new property group to the project. SetProperty uses the condition parameter to determine the name of the property group place it in.

Applies to

SetProperty(String, String, String, PropertyPosition, Boolean)

Sets the value of the specified property.

public:
 void SetProperty(System::String ^ propertyName, System::String ^ propertyValue, System::String ^ condition, Microsoft::Build::BuildEngine::PropertyPosition position, bool treatPropertyValueAsLiteral);
public void SetProperty (string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.PropertyPosition position, bool treatPropertyValueAsLiteral);
member this.SetProperty : string * string * string * Microsoft.Build.BuildEngine.PropertyPosition * bool -> unit
Public Sub SetProperty (propertyName As String, propertyValue As String, condition As String, position As PropertyPosition, treatPropertyValueAsLiteral As Boolean)

Parameters

propertyName
String

The name of the property to change.

propertyValue
String

The value to assign the property.

condition
String

The condition to use on the property. Corresponds to the Condition attribute of the Property element.

position
PropertyPosition

A PropertyPosition value indicating the location to insert the property.

treatPropertyValueAsLiteral
Boolean

true to treat the propertyValue parameter as a literal value; otherwise, false.

Applies to