F# MonoDevelop plugin prerequisites

In order to work properly, the F# MonoDevelop plugin needs to be able to locate the F# installation directory. This is needed by the F# language service (because we need to provide full path to FSharp.Core.dll and other F# assemblies). The lookup procedure follows these rules:

  • Look into app.config and read path from the fsharp-compiler-location value in application settings
  • On Windows, look for registry keys created by F# installation
  • Look at files /usr/bin/fsharpi and /usr/local/bin/fsharpi generated by the F# packages and take the path from these files. The easiest option is to install "Additional scripts and tools"
  • Use the value from FSHARP_COMPILER_BIN environment variable

The compilation (when you hit Ctrl+F5) locates the F# compiler using the following rules:

  • When running on Mono and the fsharpc script exists in any of the above mentioned directories, then use fsharpc.
  • If fsc.exe can be found in the directory resolved using the above rules, then run mono <fsc> on Mono or <fsc> on Windows
  • If file cannot be found, then simply run fsc.exe on Windows or fsharpc on Mono (hoping that these exist somewhere in your PATH)