Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
string solutionPath = @"C:\Users\...\PathToSolution\MySolution.sln";
var msWorkspace = MSBuildWorkspace.Create();
var solution = msWorkspace.OpenSolutionAsync(solutionPath).Result;
foreach (var project in solution.Projects)
foreach (var document in project.Documents)
Console.WriteLine(project.Name + "\t\t\t" + document.Name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment