[英]Does F# 3.1 require a specific runtime to be installed?
I've written some Visual Studio extensions that support VS2012+VS2013. 我编写了一些支持VS2012 + VS2013的Visual Studio扩展。 I'd like to use F# in them; 我想在其中使用F#; and I'm a little confused about the target runtimes... 我对目标运行时有点困惑......
I'm targetting .NET 4.5 (not 4.5.1), but I can also select between F# 3.0 and 3.1. 我的目标是.NET 4.5(不是4.5.1),但我也可以选择F#3.0和3.1。 I'm aware F# 3.1 shipped with VS2013 (and .NET 4.5.1), so I'm not sure if: 我知道F#3.1附带VS2013(和.NET 4.5.1),所以我不确定是否:
(Targetting 3.0 is no big deal; there doesn't seem to be a massive amount in 3.1; but it'd be useful to know how these things relate). (目标3.0没什么大不了的; 3.1中似乎没有大量数据;但了解这些事情的相关性是有用的)。
To answer 1: 回答1:
Can I use F# 3.1 and .NET 4.5, or does F# 3.1 require .NET 4.5.1? 我可以使用F#3.1和.NET 4.5,还是F#3.1需要.NET 4.5.1? (VS lets me pick this combination) (VS让我选择这个组合)
Yes, you can 是的你可以
To answer 2: 回答2:
You can open and work with F# projects that were created in Visual Studio 2013 or Visual Studio 2012 in either version of Visual Studio, without making any modifications. 您可以在任何版本的Visual Studio中打开和使用在Visual Studio 2013或Visual Studio 2012中创建的F#项目,而无需进行任何修改。 The only exception is that, the first time that you open a Visual Studio 2012 project in Visual Studio 2013, Visual Studio makes a small change to enable the project to be used in both versions. 唯一的例外是,第一次在Visual Studio 2013中打开Visual Studio 2012项目时,Visual Studio会进行一些小的更改,以使项目能够在两个版本中使用。 This capability is known as round-tripping. 此功能称为往返。 You can specify which version of the F# runtime (and core library) you want to target on the Application tab of the project's properties. 您可以在项目属性的“应用程序”选项卡上指定要定位到哪个版本的F#运行时(和核心库)。 Choose F# 3.0 if you're creating a library that must run in many contexts or you want to participate in project round-tripping. 如果您要创建一个必须在许多上下文中运行的库,或者您想要参与项目往返,请选择F#3.0。 If you choose F# 3.0, you won't be able to use any of the language features that are new in F# 3.1, such as named union cases and enhanced array slicing. 如果选择F#3.0,则无法使用F#3.1中新增的任何语言功能,例如命名的联合案例和增强的数组切片。 If you change the target runtime to F# 3.1, you can't reopen the project in Visual Studio 2012. 如果将目标运行时更改为F#3.1,则无法在Visual Studio 2012中重新打开该项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.