Use F# on Windows
Option 1: Install the CLI tools and use your own editor
Install the.NET Core SDK. Once that is installed, you can begin using F#!
Create a file calledhello.fsx that looks like this:
printfn"Hello World from F#"Now compile and run this F# script with the following command:
dotnet fsi hello.fsxIf this is your first time using .NET Core, there will be a short, one-time message about using the .NET SDK. After that, you’ll see the following output in your console:
Hello World from F#To create a project use
dotnet new console --language F#dotnet runYou will see a message saying “Hello World from F#”.
For more information seeGetting started with the F# command line tools.
Option 2: Install Visual Studio Code and Ionide
Visual Studio Code is a free,open source, cross platform source code editorsupportinga lot of languages.F# is supported by theIonide project.
Install.NET Core SDK like in step 1.
InstallVisual Studio Code for Windows.
Press
Ctrl+Shift+Pand enter the following to install the Ionide package for VS Code.ext install Ionide-fsharp
You can also install the plugin from the plugin pane on the left-hand side.
Ionide works best if you use the .NET CLI to create your projects. You can learn more inGet Started with F# in Visual Studio Code.
Option 3: Install Visual Studio
On Windows, F# programmers commonly use the Visual Studio tools for F#.
Visual Studio 2019 comes with F# support in all its editions: Community, Professional and Enterprise. Community is completely free. SeeGet started with F# in Visual Studio for more information.
If you already have an older version of Visual Studio, F# is also supported. But the quality of the tooling support and number of features is not as high as in Visual Studio 2019.
Option 4: Install JetBrains Rider
JetBrains Rider is a cross-platform .NET IDE built using IntelliJ and ReSharper technology. It offers support for .NET and .NET Core applications on all platforms.
InstallJetBrains Rider for Windows.
Install the latest.NET Core SDK.
if you need to use the older .NET Framework instead of .NET Core, you will also need either to install Visual Studio or to follow the stepshere.
Option 5: Build F# from source
You can build and contribute to the F# compiler and library fromthe source.