fsprojects / FAKE

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

Referencing latest version of Fake.Core.Process (5.22.0) nuget gives FSharp.Core downgrade warnings at compile time and throws at runtime #2669

Open knocte opened 2 years ago

knocte commented 2 years ago

Description

Referencing latest version of Fake.Core.Process (5.22.0) gives FSharp.Core downgrade warnings at compile time. I see them this way in VS4Mac:

Screenshot 2022-05-05 at 12 41 50 PM

Then if I try to use the library, for example writing this in Program.fs:

open System

open Fake.Core

[<EntryPoint>]
let main argv =
    CreateProcess.fromRawCommand "/bin/date" []
    |> Proc.run // start with the above configuration
    |> ignore // ignore exit code
    0 // return an integer exit code

I get this exception:

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'FSharp.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'FSharp.Core, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I've tried to find a workaround (e.g. add an explicit nuget reference to last FSharp.Core version), to no avail.

Repro steps

  1. Create new .NET5 F# Console Project in VS4Mac
  2. Add Fake.Core.Process as a nuget reference, use the lib in Program.fs.

Expected behavior

It should not give any warnings about FSharp.Core, and when running the project it should just work without exceptions.

Actual behavior

See screenshot above for the warnings I get. Also see crash pasted above.

Known workarounds

Not yet.

Related information