Compartir a través de


DataSource.PersistedName Property

Gets or sets the actual MSBuild property name used to read/write the value of this property.

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.Framework.XamlTypes
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

Syntax

'Declaration
Public Property PersistedName As String
public string PersistedName { get; set; }
public:
property String^ PersistedName {
    String^ get ();
    void set (String^ value);
}
member PersistedName : string with get, set
function get PersistedName () : String 
function set PersistedName (value : String)

Property Value

Type: System.String
Returns the actual MSBuild property name used to read/write the value of this property.

Remarks

Applicable only to DataSource objects attached to properties.

The persisted name will usually be the same as the property name as it appears in the Rule and the value of this property can therefore be left at is default of null.

Since property names must be unique but need not be unique in the persisted store (due to other differences in the data source such as item type) there may be times when Rule property names must be changed to be unique in the XAML file, but without changing how the property is persisted in the MSBuild file.

It is in those cases where this property becomes useful.It may also be useful in specialized build environments where property names must differ from the normally used name in order to maintain compatibility with the project system.

.NET Framework Security

See Also

Reference

DataSource Class

Microsoft.Build.Framework.XamlTypes Namespace