Compartir a través de


Utilities.Escape Method

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

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

Syntax

'Declaration
Public Shared Function Escape ( _
    unescapedExpression As String _
) As String
public static string Escape(
    string unescapedExpression
)
public:
static String^ Escape(
    String^ unescapedExpression
)
static member Escape : 
        unescapedExpression:string -> string
public static function Escape(
    unescapedExpression : String
) : String

Parameters

Return Value

Type: System.String
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.

.NET Framework Security

See Also

Reference

Utilities Class

Microsoft.Build.BuildEngine Namespace