Installing .NET and F#
F# doesn't require a separate installer — it has shipped as part of the .NET SDK since .NET Core 2.0, so installing .NET automatically gives you the F# compiler (fsc), the F# Interactive REPL (fsi), and MSBuild support for F# projects. Downloading the SDK from dotnet.microsoft.com (or your OS package manager) is the only prerequisite before writing your first .fs or .fsx file.
Cricket analogy: F# shipping inside the .NET SDK since Core 2.0 is like a bat that already comes pre-strung and knocked-in when you buy it — you don't need to source separate equipment before walking out to the crease.
Installing the .NET SDK
On Windows, the easiest path is winget install Microsoft.DotNet.SDK.8, or the graphical installer from the .NET site; on macOS, brew install dotnet-sdk; on most Linux distributions, apt install dotnet-sdk-8.0 (Ubuntu/Debian) or the equivalent for your package manager, since Microsoft publishes feeds for major distros. It's worth choosing a Long-Term Support (LTS) release, such as .NET 8, unless you specifically need preview features, since LTS versions get security patches for three years.
Cricket analogy: Choosing an LTS release over a preview build is like picking a proven, tour-tested batting order over an experimental lineup for a high-stakes final.
F# Interactive (fsi) and Editor Tooling
Once installed, F# Interactive (dotnet fsi) gives you a read-eval-print loop for experimenting with expressions line by line, which is invaluable while learning syntax before committing to a full project. For editing, Visual Studio Code with the Ionide-fsharp extension is the most popular free setup — it adds syntax highlighting, IntelliSense, and inline error checking powered by FSAutoComplete (FSAC); Visual Studio and JetBrains Rider both include F# tooling built in or via a lightweight plugin.
Cricket analogy: Using fsi to try out expressions line by line is like a batter taking throwdowns in the nets before facing a real bowler in the middle.
Verifying Your Setup
To verify the install, open a terminal and run dotnet --version to confirm the SDK is on your PATH, then create a throwaway project with dotnet new console -lang "F#" -o HelloFSharp and run it with dotnet run from inside that folder. If both commands succeed and you see printed output, your F# toolchain — compiler, runtime, and project templates — is fully working end to end.
Cricket analogy: Running dotnet --version before starting a project is like checking the pitch report before deciding your team's batting order — confirm conditions before committing.
# Verify the SDK is installed
dotnet --version
# Create a new F# console project
dotnet new console -lang "F#" -o HelloFSharp
cd HelloFSharp
# Run it
dotnet run
# Or launch the F# Interactive REPL directly
dotnet fsiQuote the language flag as -lang "F#" in most shells — the unquoted # character is interpreted as the start of a comment by bash and PowerShell, which silently truncates the command.
Don't install F# from an old standalone 'F# installer' you might find in an outdated tutorial — since .NET Core 2.0, that separate installer is obsolete and can conflict with the SDK-integrated tooling.
- F# ships inside the .NET SDK — installing .NET SDK 8 (or later) is the only step required to get fsc, fsi, and F# project templates.
- Install via winget (Windows), brew (macOS), or your Linux distro's package manager, e.g. apt for Ubuntu.
- Prefer an LTS release like .NET 8 for stability and three years of security updates.
- dotnet fsi launches the F# Interactive REPL for quick, line-by-line experimentation.
- VS Code plus the Ionide extension is the most common free editor setup for F#.
- Verify your install with dotnet --version, then dotnet new console -lang "F#" followed by dotnet run.
Practice what you learned
1. Since which .NET version has F# been bundled directly into the SDK, requiring no separate installer?
2. Which command launches the F# Interactive REPL?
3. Why must -lang "F#" be quoted in most shells?
4. What is the recommended VS Code extension for F# development?
5. Why choose an LTS release like .NET 8 over a preview build?
Was this page helpful?
You May Also Like
What Is F#?
An overview of F# as a functional-first, statically typed language on .NET, its origins, and why developers choose it.
Your First F# Program
A walkthrough of scaffolding, understanding, and running a basic F# console application, from Program.fs to dotnet run.
F# Syntax Basics
A tour of F#'s significant whitespace, function definitions, the pipe and composition operators, and basic types.
Related Reading
Related Study Notes in Programming
Browse all study notesApache Spark Study Notes
Programming · 30 topics
ProgrammingApache Flink Study Notes
Programming · 30 topics
ProgrammingHadoop Study Notes
Programming · 30 topics
ProgrammingSnowflake Study Notes
Programming · 30 topics
ProgrammingApache Airflow Study Notes
Programming · 30 topics
Programmingdbt (Data Build Tool) Study Notes
Programming · 30 topics