fsprojects / FAKE

FAKE - F# Make
https://fake.build
Other
1.28k stars 581 forks source link

How to pin FSharp.Core to version 4.7.0 #2649

Closed sandeep-eroad closed 2 years ago

sandeep-eroad commented 2 years ago

I have dotnet 5 on my system and created a new fake script following instructions (https://fake.build/fake-gettingstarted.html) but when I run dotnet fake run build.fsx I get error

Script reported an error:
-> TypeInitializationException: The type initializer for '<StartupCode$Fake-Core-Target>.$Target' threw an exception.
-> TypeLoadException: Could not load type 'Microsoft.FSharp.Core.CompilerServices.ListCollector`1' from assembly 'FSharp.Core, Version=4.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Hint: To further diagnose the problem you can run fake in verbose mode `fake -v run ...` or set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'
Warning: Paket resolved a FSharp.Core with version '6.0.0.0', but fake runs with a version of '4.7.0.0'.

I am trying to figure put how to pin FSharp.Core to version 4.7.0.

github-actions[bot] commented 2 years ago

Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!

hslaa commented 2 years ago

How did you end up solving this @sandeep-eroad? We're seeing the same issues here.

sandeep-eroad commented 2 years ago

yes.

#r "paket:
nuget FSharp.Core = 4.7.0
.
.
.