Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News Getting Started with F# on Linux and Mac OS X

Getting Started with F# on Linux and Mac OS X

Lire ce contenu en français


The advent of .NET Core brings the ability to build and run F# programs on Linux and Mac OS X with the same level of support as Windows. David Stephens, program manager for F# at Microsoft, presented how to get started with F# on .Net Core at Build 2016.

The first step is to install the .NET Core tools. This step is the same for both C# and F#, as the tools are for .NET and not a specific language.

A basic F# project is created using the following CLI command:

dotnet new –lang f#

The resulting project file is a Json file, following the new project file format introduced in NuGet 3. The project.json file for a newly created F# project contains the basic dependencies to compile and run a program:

  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true

  "compilerName": "fsc",
  "compileFiles": [

  "dependencies": {
    "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221",
    "NETStandard.Library": "1.0.0-rc2-23811"

  "frameworks": {
    "dnxcore50": { }

The dependencies assemblies are not included at project creation. The only step remaining remaining before executing the program is to restore them:

dotnet restore
dotnet run

These steps are the minimum required to compile and run an F# program on .NET Core. Cross-platform IDEs Visual Studio Code and Atom both support F# through the open-souce extension Ionide. Alongside the more common IDE features such as autocompletion, Ionide includes:

It is important to note that .Net CLI and .Net Core are still work in progress at the time of this writing. The porting of libraries to .Net Core is also a work in progress.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.