RegistrationAttribute::RegistrationContext::EscapePath Method (String^)
Reformats a string as needed by the registration tool.
Assembly: Microsoft.VisualStudio.Shell.Immutable.10.0 (in Microsoft.VisualStudio.Shell.Immutable.10.0.dll)
Parameters
- str
-
Type:
System::String^
The path string to reformat.
Many registration programs require strings to be in a special format in order to work. For instance, the files used by regedit.exe (.reg / .vbr) use back slash characters ("\") to indicate special characters using character escapes. In order for regedit.exe to interpret a file path correctly, each back slash must be repeated to form the correct character escape ("\\"). For more information on character escapes, see Character Escapes in Regular Expressions. In CreatePkgDef, EscapePath formats a string containing a file path by replacing single back slash characters ("\") with double back slash characters ("\\"). However, other classes that implement EscapePath can perform whatever string conversion is required.