Project.ExpandString(String) Method

Definition

Evaluates the provided string by expanding items and properties, as if it was found at the very end of the project file. This is useful for some hosts for which this kind of best-effort evaluation is sufficient. Does not expand bare metadata expressions.

C#
public string ExpandString(string unexpandedValue);

Parameters

unexpandedValue
String

The string to be evaluated.

Returns

The evaluated string.

Remarks

This method can be used when best-effort evaluation is sufficient.

Applies to

產品 版本
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17