简体   繁体   English

具有Visual Studio代码的F#.net框架

[英]F# .net framework with visual studio code

是否有任何网站或书籍解释如何为.net框架进行编译,并在Visual Studio代码中编写F#代码?

The Visual Studio 2017 Build Tools SKU , does not install Visual Studio. Visual Studio 2017生成工具SKU不会安装Visual Studio。 It just installs MSBuild and various other compiler toolchains. 它仅安装MSBuild和其他各种编译器工具链。

Simply select F# from the Individual Components tab (or on the right-hand side in the MSBuild workload) and press Install. 只需从“单个组件”选项卡(或在MSBuild工作负载的右侧)中选择F#,然后按Install。

The installation location will be: C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\FSharp 安装位置为: C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\FSharp

Use F# on Windows 在Windows上使用F#


  1. How to use F# in command line with link to an installer and a short usage example. 如何在命令行中使用F#,并提供安装程序链接和简短用法示例。
  2. How to install ionide with examples. 如何使用示例安装ionide

You can compile for .NET Framework using the .NET Core SDK, actually. 实际上,您可以使用.NET Core SDK为.NET Framework进行编译。 You just need to indicate that in your project file (*.fsproj). 您只需要在项目文件(* .fsproj)中指出即可。 Where it says something like this: 它说像这样的地方:

<TargetFramework>netcoreapp2.2</TargetFramework>

put this instead: 把它改为:

<TargetFramework>net472</TargetFramework>

(or a lower number if you need to target an older framework) (如果需要使用较旧的框架,则为较小的数字)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM