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

ParseAndCheckFileInProject fails #10303

Closed
auduchinok opened this issue Oct 21, 2020 · 5 comments
Closed

ParseAndCheckFileInProject fails #10303

auduchinok opened this issue Oct 21, 2020 · 5 comments
Labels

Comments

@auduchinok
Copy link
Member

auduchinok commented Oct 21, 2020

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.

@dsyme
Copy link
Contributor

dsyme commented Dec 1, 2020

I'm hitting this failure as well when updating FSHarp.Formatting to use latest FCS

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

I agree

@baronfel Have you noticed this issue with people using latest FCS?

@baronfel
Copy link
Member

baronfel commented Dec 1, 2020

Yes, many consumers have had to add this package (including things like sharplab and xunit).

@auduchinok
Copy link
Member Author

We've had to workaround it by temporarily deleting the references and related code in our FCS build.

@cartermp
Copy link
Contributor

cartermp commented Feb 6, 2021

I take it this still an issue with FCS 38.0.2? I don't think we can get rid of the dependency but it should at least be added to the nuspec.

@cartermp cartermp added this to the 16.9 milestone Feb 6, 2021
@cartermp cartermp removed this from the 16.9 milestone Mar 15, 2021
@cartermp
Copy link
Contributor

Closing out older issue due to needs more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants