Skip to content

ParseAndCheckFileInProject fails #10303

@auduchinok

Description

@auduchinok

Running FSharpChecker.ParseAndCheckFileInProject fails with creation error returned:

Could not load file or assembly 'Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

It happens due to extra FCS dependencies were added in #9870: https://github.com/dotnet/fsharp/pull/9870/files#diff-f80f13c95d4e5cb2e376c9f82051683af78316220d065db8470e4894b096c46fR731-R733

Removing the references (and moving the related code to #if makes it work as expected (since the moved declarations aren't used in netsandard2.0 FCS anyway).

I believe FCS should not depend on MSBuild directly like this, since it quite constraints the environment FCS could be used in.

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