code analysis - Using an AdHocWorkspace results in "The language 'C#' is not supported." -


using rc2 of microsoft.codeanalysis.csharp.workspaces in vs2015, code throws exception:

var tree = csharpsyntaxtree.parsetext(...); var workspace = new adhocworkspace(); var newroot = simplifier.expand(tree.getroot(),     compilation.getsemanticmodel(tree, false),     workspace,     n => true,     true,     cancellationtoken.none); 

the exception message "the language 'c#' not supported."

what missing make work?

you need add reference c# workspaces nuget package.

this copy c# dlls output, , let roslyn's mef scanner see language services.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -