Jun 26

F# Hello World

The following steps guide you to compiling your first program, with F# version with .NET 2.0.

  • From Add/Remove programs, uninstall any previous F# installs.
  • Download F# and save the zip file locally.
  • Extract the files to a temporary location:
    cd tempFSharp-
  • Run the .msi installer from that directory. This requires .NET 2.0.

    Note, if you have Visual Studio, the installer will run devenv /setup which takes some moments.

  • Add the F# bin directory to your path:
    set PATH=c:Program FilesFSharp-;%PATH%
  • fsc is the command line compiler. You can list the command line options as follows:
    fsc -help
  • Create a source directory.
    mkdir devsrc
  • Create a file \dev\src\hello.fs containing:
    printf "Hello World!n"
  • Compile it to give a hello.exe which you can run.
    cd devsrc
    fsc hello.fs
Jun 26

F# Download

Brief Description

F# is an advanced .NET programming language available from Microsoft Research.


The F# License is a Microsoft Research Shared Source License Agreement. F# may be used to build commercial applications as covered by that license, in particular see the exemptions (i) and (ii) in the main body of the license. When downloading software from this site, you will be presented with a dialog box explaining the terms of use. You must agree to these terms as a condition of downloading the software.


F# Compiler

Links for specific versions:

Note, some users report that “save” works but “open” does not.

  • To install, save and unpack the zip file and read the installation notes (README-fsharp.html).
  • From Add/Remove Programs uninstall any previous “F# Extensions for Visual Studio 2003 and 2005″.
  • Run “InstallFSharp.msi”.
  • On Mono/Linux follow the instructions in README-fsharp.html.
System Requirements

Operating system either Windows 2000, Windows Server 2003, Windows XP or Linux (Mono). Memory 256Mb minimum, recommending 512Mb or more.

Related Resources