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)
Example
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
fcs.ParseAndCheckProject(fcsPo)
Main differences
requirements
require msbuild or dotnet msbuild.
no xbuild.
for mono a recent version in required (>= 5.16 is tested)
fsproj
- 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
In fsharp/FsAutoComplete we replaced
FSharp.Compiler.Service.ProjectCrackerwith Dotnet.ProjInfo.Workspace.FCSWe can maybe retire projectcracker and update docs to use the new library.
Main Features:
msbuildordotnet, doesnt ship or use msbuild assembliesExample
Main differences
requirements
require
msbuildordotnet msbuild.no
xbuild.for mono a recent version in required (>= 5.16 is tested)
fsproj
msbuildordotnet msbuild.info about environment
dotnetin 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