src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/Snapshot/IDependencyExtensions.cs
/// <summary>
/// Tries to convert OriginalItemSpec to absolute path for given dependency. If OriginalItemSpec is 
/// absolute path, just returns OriginalItemSpec. If OriginalItemSpec is not absoulte, tries to make
/// OriginalItemSpec rooted to current project folder.
/// </summary>
Tries to convert OriginalItemSpec to absolute path for given dependency. If OriginalItemSpec is
absolute path, just returns OriginalItemSpec. If OriginalItemSpec is not absoulte, tries to make
OriginalItemSpec rooted to current project folder.
Tries to convert OriginalItemSpec to absolute path for given dependency . If OriginalItemSpec is absolute path just returns OriginalItemSpec . If OriginalItemSpec is not absoulte tries to make OriginalItemSpec rooted to current project folder .
public static string GetActualPath(this IDependency dependency, string containingProjectPath)
        {
            var dependencyProjectPath = dependency.OriginalItemSpec;
            if (string.IsNullOrEmpty(dependency.OriginalItemSpec))
            {
                return null;
            }
            if (!ManagedPathHelper.IsRooted(dependency.OriginalItemSpec))
            {
                var projectFolder = Path.GetDirectoryName(containingProjectPath);
                dependencyProjectPath = ManagedPathHelper.TryMakeRooted(projectFolder, dependency.OriginalItemSpec);
            }
            return dependencyProjectPath;
        }
public static string GetActualPath ( this IDependency dependency , string containingProjectPath ) { var dependencyProjectPath = dependency . OriginalItemSpec ; if ( string . IsNullOrEmpty ( dependency . OriginalItemSpec ) ) { return null ; } if ( ! ManagedPathHelper . IsRooted ( dependency . OriginalItemSpec ) ) { var projectFolder = Path . GetDirectoryName ( containingProjectPath ) ; dependencyProjectPath = ManagedPathHelper . TryMakeRooted ( projectFolder , dependency . OriginalItemSpec ) ; } return dependencyProjectPath ; }
Tries to convert OriginalItemSpec to absolute path for given dependency.
Tries to convert OriginalItemSpec to absolute path for given dependency .
IDependency
this
containingProjectPath
string