Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
unescapedExpression
Type: System.StringThe string to convert.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.