void GetProjects string solutionPath string projectPath MSBuildWorkspa

1
2
3
4
5
6
7
8
9
void GetProjects(string solutionPath, string projectPath)
{
MSBuildWorkspace workspace = MSBuildWorkspace.Create();
Solution currSolution = workspace.OpenSolutionAsync(solutionPath)
.Result;
IEnumerable<Project> projects = currSolution.Projects;
Project currProject = workspace.OpenProjectAsync(projectPath)
.Result;
}