MSBuildWorkspace.Create() - Supported languages is zero
c#, roslyn
Solution
Make sure to deploy Microsoft.CodeAnalysis.CSharp.Workspaces.dll and/or Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll with your app.
The workspace dynamically discovers which languages it has support for by loading those assemblies.
Problem
I am using the roslyn `Formatter.Format()` method to format some c#. One of the parameters takes a `Workspace` object which can be created using `MSBuildWorkspace.Create()`. However, when I run the code I get a runtime exception because the workspace comes back with no supported languages. If I run this in console application it works fine. Any ideas?