BuildPropertyGroup.SetProperty Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the Value of the BuildProperty with the specified Name.
Overloads
SetProperty(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 Sets a property taking the property name and value as strings directly. Either overrides the value of the property with the given name, or adds it if it doesn't already exist. Setting to the same value as before does nothing. This method will take into account property precedence rules, so that for example, a reserved MSBuild property cannot be overridden by a normal property. PropertyGroup must be virtual. |
SetProperty(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 Sets a property in this PropertyGroup, optionally escaping the property value so that it will be treated as a literal. |
SetProperty(String, String)
- Source:
- BuildPropertyGroup.cs
This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution
Sets a property taking the property name and value as strings directly.
Either overrides the value of the property with the given name, or adds it if it doesn't already exist. Setting to the same value as before does nothing.
This method will take into account property precedence rules, so that for example, a reserved MSBuild property cannot be overridden by a normal property.
PropertyGroup must be virtual.
public:
void SetProperty(System::String ^ propertyName, System::String ^ propertyValue);
public void SetProperty (string propertyName, string propertyValue);
member this.SetProperty : string * string -> unit
Public Sub SetProperty (propertyName As String, propertyValue As String)
Parameters
- propertyName
- String
- propertyValue
- String
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
SetProperty(String, String, Boolean)
- Source:
- BuildPropertyGroup.cs
This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution
Sets a property in this PropertyGroup, optionally escaping the property value so that it will be treated as a literal.
public:
void SetProperty(System::String ^ propertyName, System::String ^ propertyValue, bool treatPropertyValueAsLiteral);
public void SetProperty (string propertyName, string propertyValue, bool treatPropertyValueAsLiteral);
member this.SetProperty : string * string * bool -> unit
Public Sub SetProperty (propertyName As String, propertyValue As String, treatPropertyValueAsLiteral As Boolean)
Parameters
- propertyName
- String
- propertyValue
- String
- treatPropertyValueAsLiteral
- 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