Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static List<Guid> GetAllProjectGuids()

foreach (Project project in GetAllProjects())
{
solution.GetProjectOfUniqueName(project.FullName, out hierarchy);
solution.GetProjectOfUniqueName(GetProjectFullName(project), out hierarchy);

if (hierarchy != null)
{
Expand All @@ -117,12 +117,18 @@ public static List<Guid> GetAllProjectGuids()
return projectGuids;
}

private static string GetProjectFullName(Project project)
{
var solutionFolder = Path.GetDirectoryName(DteUtils.DTE.Solution.FullName);
return Path.Combine(solutionFolder, project.UniqueName);
}

public static IEnumerable<Project> GetAllProjects()
{
return DteUtils.DTE.Solution.Projects
.OfType<Project>()
.SelectMany(GetProjects)
.Where(p => File.Exists(p.FullName));
.Where(p => File.Exists(GetProjectFullName(p)));
}

private static IEnumerable<Project> GetProjects(Project project)
Expand Down