c# - Unable to get method SyntaxTree.ParseFile in new nuget of Roslyn? -
i have installed nuget roslyn
install-package microsoft.codeanalysis -pre
i'm still unable method syntaxtree.parsefile
want pass code in .cs
file
any clue why ? how can pass file here?
the api changed little bit, 1 way :
var path = @"c:\...\somefile.cs"; using(var stream = file.openread(path)) { var syntaxtree = csharpsyntaxtree.parsetext(sourcetext.from(stream), path: path); }
Comments
Post a Comment