title: Roslyn, how to get all Classes
body: <p>How can I get all the classes from a Roslyn compilation?</p>
  
  <pre><code>        var sln = Path.Combine(path, "xxx.sln");
  
          var workspace = MSBuildWorkspace.Create();
          var solution = await workspace.OpenSolutionAsync(sln);
  
  
          Project project = solution.Projects.First(x =&gt; x.Name == "bbb");
          var compilation = await project.GetCompilationAsync();
  </code></pre>