src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Utilities/ManagedPathHelper.cs
/// <summary>
/// Makes the specified path absolute if possible, otherwise return an empty string.
/// </summary>
/// <param name="basePath">The path used as the root if <paramref name="path"/> is relative.</param>
/// <param name="path">An absolute or relative path.</param>
/// <returns>An absolute path, or the empty string if <paramref name="path"/> invalid.</returns>
Makes the specified path absolute if possible, otherwise return an empty string.
Makes the specified path absolute if possible otherwise return an empty string .
public static string TryMakeRooted(string basePath, string path)
        {
            Requires.NotNullOrEmpty(basePath, nameof(basePath));
            Requires.NotNullOrEmpty(path, nameof(path));
            try
            {
                return PathHelper.MakeRooted(basePath, path);
            }
            catch (ArgumentException)
            {
                return string.Empty;
            }
        }
public static string TryMakeRooted ( string basePath , string path ) { Requires . NotNullOrEmpty ( basePath , nameof ( basePath ) ) ; Requires . NotNullOrEmpty ( path , nameof ( path ) ) ; try { return PathHelper . MakeRooted ( basePath , path ) ; } catch ( ArgumentException ) { return string . Empty ; } }
Makes the specified path absolute if possible, otherwise return an empty string.
Makes the specified path absolute if possible otherwise return an empty string .
An absolute path, or the empty string if  invalid.
An absolute path or the empty string if invalid .
basePath
string
The path used as the root if  is relative.
The path used as the root if is relative .
path
string
An absolute or relative path.
An absolute or relative path .