Project.SetImportedProperty Method

Definition

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.

C#
public void SetImportedProperty(string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.Project importProject);
C#
[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);

Parameters

propertyName
String
propertyValue
String
condition
String
importProject
Project
Attributes

Applies to

MSBuild 17 y MSBuild (.NET Core) 17
Producto Versiones
MSBuild 17
MSBuild (.NET Core) 17

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.

C#
public void SetImportedProperty(string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.Project importedProject, Microsoft.Build.BuildEngine.PropertyPosition position);

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

MSBuild 17 y MSBuild (.NET Core) 17
Producto Versiones
MSBuild 17
MSBuild (.NET Core) 17

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.

C#
public void SetImportedProperty(string propertyName, string propertyValue, string condition, Microsoft.Build.BuildEngine.Project importedProject, Microsoft.Build.BuildEngine.PropertyPosition position, bool treatPropertyValueAsLiteral);

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.

Applies to

MSBuild 17 y MSBuild (.NET Core) 17
Producto Versiones
MSBuild 17
MSBuild (.NET Core) 17