-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexploration.fsx
28 lines (22 loc) · 919 Bytes
/
exploration.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#r "nuget: Ionide.ProjInfo"
// #r "nuget: Ionide.ProjInfo.FCS"
// #r "nuget: FSharp.Compiler.Service"
open Ionide.ProjInfo
open System.IO
open System
let toolsPath = Init.init (DirectoryInfo Environment.CurrentDirectory) None
let props = [ ("Configuration", "Debug") ]
let workspaceLoader = WorkspaceLoader.Create (toolsPath, props)
let samplePath = Path.Join(Environment.CurrentDirectory, "Sample", "Sample.fsproj")
workspaceLoader.Notifications.Add (printfn "%A")
let parsedProject =
workspaceLoader.LoadProjects [samplePath]
|> Seq.toArray
|> Seq.head
// let fpo = FCS.mapToFSharpProjectOptions parsedProject []
// fpo
// open FSharp.Compiler.CodeAnalysis
// let checker = FSharpChecker.Create(keepAssemblyContents = true)
// let checkResults = checker.ParseAndCheckProject fpo |> Async.RunSynchronously
// checkResults.GetAllUsesOfAllSymbols()
// checkResults.AssemblyContents.ImplementationFiles