正确版本的Fsharp.Core [英] Correct version of Fsharp.Core

查看:173
本文介绍了正确版本的Fsharp.Core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2013 Ultimate构建F#控制台应用程序.目标框架是.Net 4.5

I am building an F# console application with Visual Studio 2013 Ultimate. The target framework is .Net 4.5

我的计算机上安装的FSharp.Core版本(大概是通过安装VS 2013)是4.3.1.0.

The version of FSharp.Core installed on my computer (presumably by installing VS 2013) is 4.3.1.0.

在NuGet上,有两个版本的FSharp.Core,2012年4月12日发布的4.0.0,以及一个ID为Fsharp.Core.3版本0.0.2的ID,于2013年3月5日发布.

On NuGet there are two versions of FSharp.Core, 4.0.0 published April 12, 2012 and one with an ID of Fsharp.Core.3 verison 0.0.2 published March 5, 2013.

我正在寻找有关何时应使用这些版本中的每个版本的指导,版本编号使我感到困惑,我希望可以在NuGet上找到最新的生产版本.

I am looking for guidance as to when one should use each of these versions, the version numbering is confusing me and I would have expected to find the latest production release on NuGet.

我想念什么吗?

推荐答案

您不应该从nuget获取FSharp.Core. Microsoft今天不发布任何正式的F#位给nuget(尽管将来可能会改变). 3rd-party软件包 bundle FSharp.Core很常见(因为大概是用于测试/验证该3rd-party组件的版本),但是nuget当前不应该用作获取的机制. FSharp.Core更新或新版本.

You should not be obtaining FSharp.Core from nuget. Microsoft does not publish any official F# bits to nuget today (though this could potentially change in the future). It's common for 3rd-party packages to bundle FSharp.Core (since presumably that's the version used for testing/validation of that 3rd-party component), but nuget should not currently be used as a mechanism for getting FSharp.Core updates or new versions.

可悲的是,FSharp.Core的版本控制故事相当复杂,而且绝对不像更高的版本意味着更新的"那样简单.要实现的关键一件事是有2个轴-运行时支持哪些F#版本以及其目标是.NET Framework版本/配置文件.

The versioning story for FSharp.Core is sadly rather complex, and definitely not as simple as "higher version means newer." A key thing to realize is that there are 2 axes - what F# version does the runtime support, and what .NET framework version/profile does it target.

下面是VS 2013附带的FSharp.Core官方版本(在%ProgramFiles(x86)%\Reference Assemblies\Microsoft\FSharp下找到了这些版本).

Below are the official FSharp.Core versions that ship with VS 2013 (find these dropped under %ProgramFiles(x86)%\Reference Assemblies\Microsoft\FSharp).

  • 4.3.1.0 (F#3.1/.NET 4)这是最新的正式版本.除非您有针对.NET 2的要求,或者您正在使用一些无法与3.1配合使用的旧版F#组件,否则此版本应用于任何新的桌面应用程序.
  • 4.3.0.0 (F#3.0/.NET 4)这些与VS 2012一起提供.包含在其中,因此您可以继续在VS 2013中处理F#3.0项目,而无需重新定位他们到3.1.如果您有一个旧的F#3.0桌面项目尚未准备好迁移到3.1,则应使用此选项.
  • 2.3.0.0 (F#3.0/.NET 2)这些与VS 2012附带的功能相同.使用此功能的唯一原因是将.NET 2作为目标.事情的第二方面没有进一步发展,顺便说一句-针对.NET 4+的FSharp.Core将完成新功能,版本等.仍完全支持.NET 2 FSharp.Core,但已冻结.
  • 3.3.1.0 (F#3.1/便携式")此版本针对.NET便携式配置文件7(.NET 4.5/Windows Store).如果您要为Windows应用商店应用程序创建组件,而又不关心Silverlight,请使用此选项. VS 2013中新支持此配置文件.
  • 2.3.5.1 (F#3.1/便携式(旧版)")此版本针对.NET便携式配置文件47(.NET 4/Silverlight 5/Windows应用商店).如果要创建Silverlight组件,请使用此选项. VS 2012还支持此配置文件,当时称为"Portable".
  • 2.3.5.0 (F#3.0/便携式(旧版)")此版本面向.NET便携式配置文件47(.NET 4/Silverlight 5/Windows应用商店).这些与VS 2012中包含的位相同.VS 2013中包含的位使您能够继续从事F#3.0便携式/silverlight项目.
  • 4.3.1.0 (F# 3.1/.NET 4) This is the most recent official version. Unless you have a requirement to target .NET 2, or you are using some legacy F# component that won't work with 3.1, this is the version you should use for any new desktop app.
  • 4.3.0.0 (F# 3.0/.NET 4) These are the same bits that shipped with VS 2012. It is included so that you can continue working on F# 3.0 projects in VS 2013 without retargeting them to 3.1. You should use this if you have a legacy F# 3.0 desktop project that you are not ready to move to 3.1 yet.
  • 2.3.0.0 (F# 3.0/.NET 2) These are the same bits that shipped with VS 2012. The only reason to use this is if you are targeting .NET 2. The .NET 2 side of things is not being developed further, btw - new features, versions, etc will be done for FSharp.Core targeting .NET 4+; the .NET 2 FSharp.Core is still fully supported, but it is frozen.
  • 3.3.1.0 (F# 3.1/"Portable") This version targets .NET portable profile 7 (.NET 4.5/Windows Store). Use this if you are creating a component for a Windows store app and you don't care about Silverlight. This profile is newly supported in VS 2013.
  • 2.3.5.1 (F# 3.1/"Portable (Legacy)") This version targets .NET portable profile 47 (.NET 4/Silverlight 5/Windows Store). Use this if you are creating a Silverlight component. This profile was also supported in VS 2012, and referred to at that time as simply "Portable."
  • 2.3.5.0 (F# 3.0/"Portable (Legacy)") This version targets .NET portable profile 47 (.NET 4/Silverlight 5/Windows Store). These are the same bits that were included in VS 2012. Included in VS 2013 to enable you to continue working on F# 3.0 portable/silverlight projects.

.NET便携式配置文件是很大的PITA,并且会导致大量的复杂性.该站点有一个很好的摘要来帮助您理解: http://blog .stephencleary.com/2012/05/framework-profiles-in-net.html

.NET portable profiles are a big PITA and cause a ton of complexity. This site has a good summary to help understand: http://blog.stephencleary.com/2012/05/framework-profiles-in-net.html

因此,对于您的特定情况(新的控制台应用程序),请使用4.3.1.0.

So for your specific scenario (new console app) use 4.3.1.0.

编辑7/2015:

这是一张桌子,它可能比上面的文字墙更好地解释了这个故事.我尝试使用颜色来指示版本号的动机.您将看到可移植库的版本在VS 2012和2013中是临时的并且不一致,但是从VS 2015开始最终是一致且可预测的.这是刚刚发布的F#4.0的最新版本.

Here's a table that probably explains the story better than the wall of text above. I've tried to use colors to indicate the motivation for the version numbers. You'll see the versioning of the portable libraries was a bit ad hoc and inconsistent in VS 2012 and 2013, but is finally consistent and predictable starting with VS 2015. This is up to date with F# 4.0, which just released.

这篇关于正确版本的Fsharp.Core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆