다음을 통해 공유


BuildProperty Class

Definition

This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

This class holds an MSBuild property. This may be a property that is represented in the MSBuild project file by an XML element, or it may not be represented in any real XML file (e.g., global properties, environment properties, etc.)

public ref class BuildProperty
public class BuildProperty
type BuildProperty = class
Public Class BuildProperty
Inheritance
BuildProperty

Remarks

Warning

This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.Construction Microsoft.Build.Evaluation Microsoft.Build.Execution

Constructors

BuildProperty(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

Constructor, which initializes the property from just the property name and value, creating it as a "normal" property. This ends up creating a new XML element for the property under a dummy XML document.

Properties

Condition

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Accessor for the condition on the property.

FinalValue

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Returns the unescaped value of the property.

IsImported

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Did this property originate from an imported project file?

Name

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Accessor for the property name. This is read-only, so one cannot change the property name once it's set ... your only option is to create a new BuildProperty object. The reason is that BuildProperty objects are often stored in hash tables where the hash function is based on the property name. Modifying the property name of an existing BuildProperty object would make the hash table incorrect.

Value

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Accessor for the property value. Normal properties can be modified; other property types cannot.

Methods

Clone(Boolean)

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Creates a shallow or deep clone of this BuildProperty object.

A shallow clone points at the same XML element as the original, so that modifications to the name or value will be reflected in both copies. However, the two copies could have different a finalValue.

A deep clone actually clones the XML element as well, so that the two copies are completely independent of each other.

ToString()

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Returns the property value.

Operators

Explicit(BuildProperty to String)

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

This allows an implicit typecast from a "BuildProperty" to a "string" when trying to access the property's value.

Applies to