Sdílet prostřednictvím


Project.RemoveProperty(ProjectProperty) Method

Definition

Removes the specified property. Property must be associated with this project. Property must not originate from an imported file. Returns true if the property was in this evaluated project, otherwise false. As a convenience, if the parent property group becomes empty, it is also removed. Updates the evaluated project, but does not affect anything else in the project until reevaluation. For example, if "p" is removed, it will be removed from the evaluated project, but "q" which is evaluated from "$(p)" will not be modified until reevaluation. This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state.

public:
 bool RemoveProperty(Microsoft::Build::Evaluation::ProjectProperty ^ property);
public bool RemoveProperty (Microsoft.Build.Evaluation.ProjectProperty property);
member this.RemoveProperty : Microsoft.Build.Evaluation.ProjectProperty -> bool
Public Function RemoveProperty (property As ProjectProperty) As Boolean

Parameters

property
ProjectProperty

The property to remove.

Returns

true if the property is present in this evaluated project; otherwise, false.

Remarks

If the property group containing the property becomes empty, it is also removed.

The project is updated, but no further evaluation occurs until reevaluation. For example, if "p" is removed, "q" which is evaluated from "$(p)" is not modified until reevaluation.

Applies to