Exercise - Create your first F# application
In this exercise, use the .NET SDK console template to create, build, and run an F# project that prints Hello World to the console.
Create F# console application
Open the terminal.
In the terminal, enter the
dotnet new console
CLI command.dotnet new console -o HelloWorld -lang F#
After a few seconds, a directory called HelloWorld appears with the code for your F# application.
Run your application
Navigate to your HelloWorld project directory.
In the terminal, enter the following command from inside your HelloWorld directory.
dotnet run
The console displays the following output:
Hello world from F#
Congratulations! You've built and run your first F# console application.