Project.SetImportedProperty 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 a property in an imported project.
Overloads
SetImportedProperty(String, String, String, Project) |
Sets the value of a property that comes from an imported project. Updates the current project (the one this method is called on) with a property that has no Xml behind it, and updates the imported project with a real backed property. |
SetImportedProperty(String, String, String, Project, PropertyPosition) |
Set a property at a particular position inside an imported project file. The property will be in a group that has the specified condition. If necessary, a new property or property group will be created. |
SetImportedProperty(String, String, String, Project, PropertyPosition, Boolean) |
Set a property at a particular position inside an imported project file. The property will be in a group that has the specified condition. If necessary, a new property or property group will be created. |
SetImportedProperty(String, String, String, Project)
- Source:
- Project.cs
Sets the value of a property that comes from an imported project. Updates the current project (the one this method is called on) with a property that has no Xml behind it, and updates the imported project with a real backed property.
public:
void SetImportedProperty(System::String ^ propertyName, System::String ^ propertyValue, System::String ^ condition, Microsoft::Build::BuildEngine::Project ^ importProject);
public void SetImportedProperty (string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.Project importProject);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public void SetImportedProperty (string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.Project importProject);
member this.SetImportedProperty : string * string * string * Microsoft.Build.BuildEngine.Project -> unit
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
member this.SetImportedProperty : string * string * string * Microsoft.Build.BuildEngine.Project -> unit
Public Sub SetImportedProperty (propertyName As String, propertyValue As String, condition As String, importProject As Project)
Parameters
- propertyName
- String
- propertyValue
- String
- condition
- String
- importProject
- Project
- Attributes
Applies to
SetImportedProperty(String, String, String, Project, PropertyPosition)
- Source:
- Project.cs
Set a property at a particular position inside an imported project file. The property will be in a group that has the specified condition. If necessary, a new property or property group will be created.
public:
void SetImportedProperty(System::String ^ propertyName, System::String ^ propertyValue, System::String ^ condition, Microsoft::Build::BuildEngine::Project ^ importedProject, Microsoft::Build::BuildEngine::PropertyPosition position);
public void SetImportedProperty (string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.Project importedProject, Microsoft.Build.BuildEngine.PropertyPosition position);
member this.SetImportedProperty : string * string * string * Microsoft.Build.BuildEngine.Project * Microsoft.Build.BuildEngine.PropertyPosition -> unit
Public Sub SetImportedProperty (propertyName As String, propertyValue As String, condition As String, importedProject As Project, position As PropertyPosition)
Parameters
- propertyName
- String
Property name.
- propertyValue
- String
Property value.
- condition
- String
The condition for this property.
- importedProject
- Project
Specifies the project the property is imported from.
- position
- PropertyPosition
Specifies the position within the project file for the property.
Applies to
SetImportedProperty(String, String, String, Project, PropertyPosition, Boolean)
- Source:
- Project.cs
Set a property at a particular position inside an imported project file. The property will be in a group that has the specified condition. If necessary, a new property or property group will be created.
public:
void SetImportedProperty(System::String ^ propertyName, System::String ^ propertyValue, System::String ^ condition, Microsoft::Build::BuildEngine::Project ^ importedProject, Microsoft::Build::BuildEngine::PropertyPosition position, bool treatPropertyValueAsLiteral);
public void SetImportedProperty (string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.Project importedProject, Microsoft.Build.BuildEngine.PropertyPosition position, bool treatPropertyValueAsLiteral);
member this.SetImportedProperty : string * string * string * Microsoft.Build.BuildEngine.Project * Microsoft.Build.BuildEngine.PropertyPosition * bool -> unit
Public Sub SetImportedProperty (propertyName As String, propertyValue As String, condition As String, importedProject As Project, position As PropertyPosition, treatPropertyValueAsLiteral As Boolean)
Parameters
- propertyName
- String
Property name.
- propertyValue
- String
Property value.
- condition
- String
The condition for this property.
- importedProject
- Project
Specifies the project the property is imported from.
- position
- PropertyPosition
Specifies the position within the project file for the property.
- treatPropertyValueAsLiteral
- Boolean
Remarks
Sets the value of a property and optionally escapes it so that it will be treated as a literal value despite any special characters it may contain.