public void LoadSolution(SolutionFile solution, string path) { _filePath = path; _solution = solution; string fileName = Path.GetFileName(path); treeView1.Nodes.Clear(); _projects.Clear(); ProjectCollection.GlobalProjectCollection.UnloadAllProjects(); TreeNode node = treeView1.Nodes.Add(fileName); node.ImageIndex = SOLUTION; node.SelectedImageIndex = SOLUTION; foreach (ProjectInSolution projectSolution in solution.ProjectsInOrder) { Project project = Project.FromFile(projectSolution.AbsolutePath, new ProjectOptions()); _projects.Add(projectSolution.ProjectName, project); LoadProject(project, projectSolution.ProjectName, node); } }