Skip to content

Add docs for how to opt-out of the MSBuild dependency for reference resolution #653

Closed
@dsyme

Description

@dsyme

See #650 (comment)

The nuget package now includes an extra DLL in the package (FSharp.Compiler.Service.MSBuild.v12.dll) that should be included alongside FSharp.Compiler.Service.dll (This should happen automatically when you reference the nuget package).

If you don't opt-out explicitly, this DLL wil be used to maintain quality compatible behaviour, at the expense of needing either MSBuild 12 or 14 installed on your machine and loadable into your process.

The new thing is that you can opt-out of using MSBuild for reference resolution via this flag:

FSharpChecker(msbuildEnabled=false)
SimpleSourceCodeServices(msbuildEnabled=false)
FsiInteractiveSession(msbuildEnabled=false)

When you opt-out, you no longer use MSBuild for resolving #r in scripts and on command line arguments, and the above extra component will not be loaded. This means you will have no dependency on MSBuild (unless you also use the ProjectCracker, which relies on MSBuild 14). The downside is that you will instead be using a simulated version of the MSBuild reference resolution logic that may not work as well as MSBuild, see #649. If you see bugs in the SimulatedMSBuildReferenceResolveer, we can try to fix them, or you might need to stop opting out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions