F# compiler and runtime version number confusion

2019-04-26 19:47发布

问题:

I am unable to figure out which version of the F# Core runtime library should be used in combination with the Mono platform (.NET 3.5).

  • Installed with Microsoft .Net 4.5 come two versions of the FSharp Core runtime, 2.3.0.0 and 4.3.0.0. My guess is that the first one is for use in the .NET framework 2.0 and later and that the second one can only be used by .NET 4.0 or later. Is this assumption correct?
  • Since FSharp is now open source and available on Github, I can check out a recent tag, build it and use the FSharp.Core dll it produces in my project. What I do not know is how the version number on the open source FSharp relates to closed-source ones included in the .NET package?
  • The open source compiler version is now 3.0.25 and the closed source compiler seems to be 4.0, I'm confused:
    • How does the FSharp.Core Runtime version (also 3.0.25) from the open source project relate to the closed source 2.3.0.0 version? Since the number 3.0.25 is much higher than 2.3.0.0 I'm assuming the open source version is much newer, but I'm not really sure, since I don't know if the version numbers can be compared.
    • NuGet on the other hand offers FSharp.Core 2.0 and 4.0, which seems to be pretty old. Why is the new version not yet uploaded to NuGet?

回答1:

You are conflating two different kinds of version numbers; not that I blame you though -- I understand how it could be confusing if you're new to F# and/or .NET.

  • Correct. The 2.3.0.0 version of FSharp.Core is for use with .NET 2.0 (and 3.0 and 3.5, which are (basically) extended versions of .NET 2.0); the 4.3.0.0 version is for .NET 4.0 and 4.5.
  • The latest version of F# is F# 3.0. This is this version that shipped with Visual Studio 2012. NOTE: Here, 3.0 is the language version, which has nothing to do with which version of the .NET Framework you want to run. The F# repository on GitHub uses revision tags (that is, the .25 part of 3.0.25) so it's easier to tell if you need to update to a newer version; the changes are usually just build scripts, installers, etc. -- but rarely are they changes to the F# compiler and/or libraries.
  • If you build the code from the F# GitHub repository and the compiled FSharp.Core assembly has version 3.0.25, please open a new Issue on Github about this -- it should have the same version numbers as the "true" F# libraries from Microsoft. The only difference should be in the public key the assemblies are signed with.
  • I don't know why the new versions aren't on NuGet -- it was probably just forgotten about. I'll open an issue about this now to make sure they're added ASAP.


标签: .net f# mono nuget