F#

F# on .NET Core

Creating a new project via dotnet CLI

Once you’ve installed the .NET CLI tools, you can create a new project with the following command:

dotnet new --lang f#

This creates a command line program.

Initial project workflow

Create a new project

dotnet new -l f#

Restore any packages listed in project.json

dotnet restore

A project.lock.json file should be written out.

Execute the program

dotnet run

The above will compile the code if required.

The output of the default project created by dotnet new -l f# contains the following:

Hello World!
[||]

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow