internal static IEnumerable <string> IdentifyMissingDependencies(string slnFile) { IEnumerable <string> allProjectsInSolution = SolutionUtilities.GetProjectsFromSolutionRelative(slnFile); string solutionDirectory = Path.GetDirectoryName(slnFile); foreach (string projectInSolution in allProjectsInSolution) { // Expand the path string fullPath = PathUtilities.ResolveRelativePath(solutionDirectory, projectInSolution); if (!File.Exists(fullPath)) { yield return(projectInSolution); } } }
public static IEnumerable <string> IdentifyStaleDependencies(string targetSolution) { // First Grab a list of all projects in the Dependencies Folder ISet <string> dependenciesProjects = new HashSet <string>(SolutionUtilities.GetDependenciesProjects(targetSolution), StringComparer.InvariantCultureIgnoreCase); // Now Grab a list of all projects in the solution ISet <string> projectsInSolution = new HashSet <string>(SolutionUtilities.GetProjectsFromSolutionFullPath(targetSolution), StringComparer.InvariantCultureIgnoreCase); // Remove any Projects that were in the Dependencies Folder IEnumerable <string> projectsInSolutionThatAreNotDependencies = projectsInSolution.Except(dependenciesProjects); // Now rescan for dependencies IEnumerable <string> currentNOrderDependencies = MSBuildUtilities.ProjectsIncludingNOrderDependencies(projectsInSolutionThatAreNotDependencies); IEnumerable <string> result = projectsInSolution.Except(currentNOrderDependencies); return(result); }