/// <summary> /// Get the file path relative to the project directory of the specified project file path for the specified file path. /// Useful in determining /// </summary> public static string GetProjectDirectoryRelativeFilePath(string projectFilePath, string filePath) { var projectDirectoryPath = PathUtilities.GetDirectoryPath(projectFilePath); var relativeFilePath = PathUtilities.GetRelativePathDirectoryToFile(projectDirectoryPath, filePath); return(relativeFilePath); }
public static IEnumerable <string> GetProjectReferenceDependencyFilePaths(this ProjectFileModel projectFileModel, string projectFilePath) { var projectDirectoryPath = PathUtilities.GetDirectoryPath(projectFilePath); var output = projectFileModel.GetProjectReferenceDependencyFilePathsForProjectDirectory(projectDirectoryPath); return(output); }
public static string GetProjectFileRelativeToSolutionDirectoryPath(string solutionFilePath, string projectFilePath) { var solutionDirectoryPath = PathUtilities.GetDirectoryPath(solutionFilePath); var solutionDirectoryToDependencyProjectRelativeFilePath = PathUtilities.GetRelativePathDirectoryToFile(solutionDirectoryPath, projectFilePath); return(solutionDirectoryToDependencyProjectRelativeFilePath); }
public static IEnumerable <string> GetProjectReferenceDependencyFilePaths(ProjectFileModel projectFile, string projectFilePath) { var projectDirectoryPath = PathUtilities.GetDirectoryPath(projectFilePath); var projectReferenceRelativeFilePaths = projectFile.GetProjectReferenceRelativePaths(); var projectReferenceDependencyFilePaths = Utilities.GetProjectReferenceDependencyFilePathsForProjectDirectory(projectDirectoryPath, projectReferenceRelativeFilePaths); return(projectReferenceDependencyFilePaths); }
public static string GetProjectFilePath(string solutionFilePath, string projectRelativeToSolutionDirectoryFilePath) { var solutionDirectoryPath = PathUtilities.GetDirectoryPath(solutionFilePath); var projectFileUnresolvedPath = PathUtilities.Combine(solutionDirectoryPath, projectRelativeToSolutionDirectoryFilePath); var projectFilePath = PathUtilities.ResolveFilePath(projectFileUnresolvedPath); return(projectFilePath); }
public string GetGitHubAccountDirectoryPath(string solutionFilePath) { var solutionDirectoryPath = PathUtilities.GetDirectoryPath(solutionFilePath); var sourceDirectoryPath = PathUtilities.GetParentDirectoryPath(solutionFilePath); var repositoryDirectoryPath = PathUtilities.GetParentDirectoryPath(sourceDirectoryPath); var gitHubAccountDirectoryPath = PathUtilities.GetParentDirectoryPath(repositoryDirectoryPath); return(gitHubAccountDirectoryPath); }
public string GetSolutionFilePath(string currentExecutableFilePath, string solutionFileName) { var binDebugNetCoreAppDirectoryPath = PathUtilities.GetDirectoryPath(currentExecutableFilePath); var binDebugDirectoryPath = PathUtilities.GetParentDirectoryPath(binDebugNetCoreAppDirectoryPath); var binDirectoryPath = PathUtilities.GetParentDirectoryPath(binDebugDirectoryPath); var projectDirectoryPath = PathUtilities.GetParentDirectoryPath(binDirectoryPath); var solutionDirectoryPath = PathUtilities.GetParentDirectoryPath(projectDirectoryPath); var solutionFilePath = PathUtilities.Combine(solutionDirectoryPath, solutionFileName); return(solutionFilePath); }