Compartilhar via


Project.GetPropertyValue Method

Gets the value of the given property in this project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Evaluation
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

Syntax

'Declaration
Public Function GetPropertyValue ( _
    name As String _
) As String
public string GetPropertyValue(
    string name
)
public:
String^ GetPropertyValue(
    String^ name
)
member GetPropertyValue : 
        name:string -> string
public function GetPropertyValue(
    name : String
) : String

Parameters

  • name
    Type: System.String

    The name of the property whose value is retrieved.

Return Value

Type: System.String
Returns the value of the given property in this project. Return an empty string if no property of that name exists. Escape sequences are converted before returning the string.

Remarks

A property with a value of empty string and no property at all are not distinguished between by this method. To determine if a property is set at all in the project, use GetProperty(name).

.NET Framework Security

See Also

Reference

Project Class

Microsoft.Build.Evaluation Namespace