Joelty
Joelty

Reputation: 2009

How to generate Roslyn AST if I have only path to sln?

I have path to sln file: C:\test\test.sln that has e.g 4 projects inside

How can I generate AST or AST per project or anything to be able to walk through those codes?

Upvotes: 0

Views: 247

Answers (1)

Jason Malinowski
Jason Malinowski

Reputation: 19031

Use MSBuildWorkspace (there's some documentation here) which will let you load the project. From there, the link that Carles gave will give you some hints for how to walk around.

Upvotes: 1

Related Questions