Skip to content

Instantly share code, notes, and snippets.

@JoshVarty
Last active February 1, 2016 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JoshVarty/99b012f0304c0a557f47 to your computer and use it in GitHub Desktop.
Save JoshVarty/99b012f0304c0a557f47 to your computer and use it in GitHub Desktop.
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