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
Post a Comment