title: Roslyn throws The language 'C#' is not supported
body: <p>I have created a <em>class library project</em> and did some processing and also used Roslyn to generate code.</p>
  
  <p>I use the library in a WPF GUI application as a reference.</p>
  
  <p>These are the NuGet packages:</p>
  
  <p><a href="https://i.stack.imgur.com/ghPqF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ghPqF.png" alt="enter image description here"></a></p>
  
  <p>Build shows no error, however when I use the following code:</p>
  
  <pre><code>private static void GetGenerator()
  {
    workspace = new AdhocWorkspace();
    generator = SyntaxGenerator.GetGenerator(workspace, LanguageNames.CSharp);
  }
  </code></pre>
  
  <p>I get an exception:</p>
  
  <blockquote>
    <p>"The language 'C#' is not supported."</p>
  </blockquote>
  
  <pre><code>   at: Microsoft.CodeAnalysis.Host.HostWorkspaceServices.GetLanguageServices(String languageName)
     at: Microsoft.CodeAnalysis.Host.Mef.MefWorkspaceServices.GetLanguageServices(String languageName)
     at: Microsoft.CodeAnalysis.Editing.SyntaxGenerator.GetGenerator(Workspace workspace, String language)
  </code></pre>
  
  <p>According to <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/c03febde-cf6d-478e-ac01-99102eb07f1b/the-language-c-is-not-supported-bug-on-newcompilationunitformat?forum=roslyn" rel="noreferrer">this</a> and <a href="https://stackoverflow.com/questions/30601934/using-an-adhocworkspace-results-in-the-language-c-is-not-supported">this</a>, I have to copy the CodeAnalysis files locally and add the necessary references. They are there, yet the error occurs.</p>
  
  <p>Is this still a bug that wasn't fixed in the last year?</p>
  
  <p>What else should I do?</p>