Utilities.Escape(String) Method

Definition

Converts the specified string into a syntax that allows the MSBuild engine to interpret the character literally.

public:
 static System::String ^ Escape(System::String ^ unescapedExpression);
public static string Escape (string unescapedExpression);
static member Escape : string -> string
Public Shared Function Escape (unescapedExpression As String) As String

Parameters

unescapedExpression
String

The string to convert.

Returns

The converted value of the specified string.

Remarks

Certain characters have special meaning in MSBuild project files. Examples of the characters include semicolons (;) and asterisks (*). In order to use these special characters as literals, they must be specified with the syntax %nn, where nn represents the ASCII hexadecimal value of the character. This method performs that conversion.

Applies to