Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove FSharp.Compiler.Service.ProjectCracker #905

enricosada opened this issue Jun 7, 2019 · 2 comments


None yet
3 participants
Copy link

commented Jun 7, 2019

In fsharp/FsAutoComplete we replaced FSharp.Compiler.Service.ProjectCracker with Dotnet.ProjInfo.Workspace.FCS

We can maybe retire projectcracker and update docs to use the new library.

Main Features:

  • get FCS project options from sln/list of fsproj/fsx
  • use installed msbuild or dotnet, doesnt ship or use msbuild assemblies
  • support an easy to use api for loading a workspace (multiple fsprojs or a sln)
  • editor features (solution explorer view, background loading with notifications)


let fcs = FSharp.Compiler.SourceCodeServices.FSharpChecker.Create(..)

// environment info
let msbuildLocator = MSBuildLocator()
let netFwInfo = NetFWInfo.Create(NetFWInfoConfig.Default msbuildLocator)

let fcsBinder = FCSBinder(netFwInfo, loader, fcs)

// blocking load of a list of fsproj. For sln use LoadSln
loader.LoadProjects [ projPath ]

// fcsBinder.Projects contains info about loaded projects, use that to convert to FCS args
let fcsPoOpt = fcsBinder.GetProjectOptions(projPath) |> Option.get

// usual parse and check

Main differences


require msbuild or dotnet msbuild.
no xbuild.
for mono a recent version in required (>= 5.16 is tested)


  • support both .NET Sdk (slim) and Old Sdk (verbose) fsproj using the same api
  • use msbuild out of process as console, no references to msbuild assemblies. So works with any msbuild or dotnet msbuild.
  • support loading a sln or a list of fsproj
  • support fsx scripts
  • always read fsc arguments from invoked FcsTask (not calculating these from fsproj property). For both .net sdk fsproj and old sdk fsproj.

info about environment

  • support discovery of installed msbuild locations
  • support .NET Framework versions installed
  • sane defaults for default environment (dotnet in PATH, latest .net msbuild)

@dsyme @baronfel @cartermp @KevinRansom What do you think?

If ok, i'll send a PR to remove it and update all docs to use Dotnet.ProjInfo.Workspace.FCS, maintaining the same scenarios.

/cc @Krzysztof-Cieslak

@enricosada enricosada changed the title Remove `FSharp.Compiler.Service.ProjectCracker` Remove FSharp.Compiler.Service.ProjectCracker Jun 7, 2019


This comment has been minimized.

Copy link

commented Jun 12, 2019

Sounds great!


This comment has been minimized.

Copy link

commented Jun 12, 2019

Should code flow here be dotnet/fsharp -> this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.