Mono-based F# works on FreeBSD in a jail. There isn't a port for .NET core yet. So I don't want to try it yet.

pkg install mono-4.8.1.0_1
pkg install fsharp-4.1.18

Here's a summary:

  1. run with mono <app.exe>
  2. build with xbuild
  3. nuget and paket works after mozroot --import
  4. there isn't an official port for .NET core yet
  5. there isn't an official port for vscode yet

Building projects and running executables

Use xbuild to build. Use mono <app.exe> to run.

Package Management

nuget and packet binaries work directly.

Certificate Issue

However you need to import root certificates to avoid encryption/decryption error while downloading from SSL enabled sites. See this issue.

mozroot --import  # and type "yes" MANY MANY times

Nuget

For nuget:

wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mono ./nuget install NewtonSoft.Json

Paket

For paket, follow paket guide:

cd <repo>/.paket
wget https://github.com/fsprojects/Paket/releases/download/3.31.0/paket.bootstrapper.exe
mv paket.bootstrapper.exe paket.exe  # enable "magic" mode
cd ..
mono ./.paket/paket.exe install      # install all dependencies

Package Information

➜  ~ pkg info mono
mono-4.8.1.0_1
Name           : mono
Version        : 4.8.1.0_1
Installed on   : Fri Aug  4 05:53:48 2017 UTC
Origin         : lang/mono
Architecture   : FreeBSD:11:amd64
Prefix         : /usr/local
Categories     : lang
Licenses       : MIT
Maintainer     : mono@FreeBSD.org
WWW            : http://www.mono-project.com/
Comment        : Open source implementation of .NET Development Framework
Options        :
        ACCEPTANCE_TESTS: off
Shared Libs required:
        libinotify.so.0
Shared Libs provided:
        libmonosgen-2.0.so.1
        libmonoboehm-2.0.so.1
        libikvm-native.so
        libmono-profiler-iomap.so.0
        libmono-profiler-aot.so.0
        libmono-profiler-log.so.0
        libMonoSupportW.so
        libMonoPosixHelper.so
Annotations    :
        cpe            : cpe:2.3:a:mono:mono:4.8.1.0:::::freebsd11:x64:1
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 183MiB
Description    :
Mono is an open source implementation of .NET Development Framework. Its
objective is to enable UNIX developers to build and deploy cross-platform
.NET Applications. The project implements various technologies developed by
Microsoft that have now been submitted to the ECMA for standardization.

Mono provides the necessary software to develop and run .NET client and
server applications on BSD, Linux, Solaris, Mac OS X, Windows, and Unix.

WWW: http://www.mono-project.com/

➜  ~ pkg info fsharp
fsharp-4.1.18
Name           : fsharp
Version        : 4.1.18
Installed on   : Fri Aug  4 05:56:19 2017 UTC
Origin         : lang/fsharp
Architecture   : FreeBSD:11:*
Prefix         : /usr/local
Categories     : lang
Licenses       : APACHE20
Maintainer     : mono@FreeBSD.org
WWW            : http://fsharp.org/
Comment        : Functional and object-oriented language for the .NET platform
Annotations    :
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 92.3MiB
Description    :
F# is an open-source, strongly typed, multi-paradigm programming
language encompassing functional, imperative and object-oriented
programming techniques.  F# is most often used as a cross-platform CLI
language, but can also be used to generate JavaScript and GPU code.

F# is developed by The F# Software Foundation and Microsoft.  An open
source, cross-platform edition of F# is available from the F# Software
Foundation.  F# is also a fully supported language in Visual Studio.
Other tools supporting F# development include Mono, MonoDevelop,
SharpDevelop and the WebSharper tools for JavaScript and HTML5 web
programming.

F# originated as a variant of ML and has been influenced by OCaml, C#,
Python, Haskell, Scala and Erlang.

WWW: http://fsharp.org/