Dela via


ProjectMetadata.UnevaluatedValue Property

Gets or sets the unevaluated metadata value.

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 Property UnevaluatedValue As String
public string UnevaluatedValue { get; set; }
public:
property String^ UnevaluatedValue {
    String^ get ();
    void set (String^ value);
}
member UnevaluatedValue : string with get, set
function get UnevaluatedValue () : String 
function set UnevaluatedValue (value : String)

Property Value

Type: System.String
Returns the unevaluated metadata value.

Remarks

The setter method updates both the unevaluated value and the evaluated value, but does not affect anything else in the project until reevaluation.

For example, --if a piece of metadata named "m" is modified on item of type "i", it does not affect "j" which is evaluated from "@(j->'%(m)')" until reevaluation. --if the unevaluated value of "m" is set to something that is modified by evaluation, such as "$(p)", the evaluated value will be set to "$(p)" until reevaluation.

Setting metadata through a ProjectItem may cause the associated ProjectItemElement to be split, if the item element originated from an item list, wildcard, or semicolon expression. because it implies an intention to only affect that particular item.

Setting metadata through ProjectMetadata does not cause any splitting, because it implies an intention to affect all items using the underlying ProjectMetadataElement.

The containing project is marked as modified. Unevaluated values are assumed to contain escaped character sequences as needed.

This method may not leave the project in a self consistent state.

.NET Framework Security

See Also

Reference

ProjectMetadata Class

Microsoft.Build.Evaluation Namespace