Using the Roslyn (Microsoft.CodeAnalysis) APIs, how do I get the Build Action
and Copy to Output Directory
File Properties
? I'm able to open the project file and get the documents, but not sure how to get the file properties.
Opening the project and looping over the filesis easy enough. I just want to know what the build action is of each.
open Microsoft.CodeAnalysis.MSBuild
use ws = MSBuildWorkspace.Create()
let pr = ws.OpenProjectAsync proj |> Async.RunTask
for doc in pr.Documents do
printfn "file %s" doc.FilePath