Firstly You should install .Net Framework and VSCode with Ionide Plugins
Start with below command line to create first F# project.
dotnet new console -lang "F#" -o FisrtFSharpProject
And move to the created project folder to open vscode properly
cd FirstFSharProject
code .
You can see below image to edit code
Go to the top menu Run > Add Configuration
to create launch.json to launch executable exe file
And select the template .NET: Luanch .NET Core Console App
And modify the program
file to launch properly. I want it to be automatically selected but Ionide can't recognize it well.
Basically Build Script would be automatically created by Ionide Plugin in VSCODE. But I recommend to create new task.json to build your project properly and to be more customizable
If you don't create task.json
then you can see below message box. But you can ignore this message and if you select Debug Anyway, It would just work. But To Create Configure is more better way.
So go to the top menu Terminal > Configure Task
then click below Create tasks.json file from template
And select .Net Core build
🔥And there is important option to increase build speed by incremental build option. You should add below option into the "args" list.
"-t:restore,build",
"-p:RestorePackagesConfig=true"
It is finished. You can launch F# executable file or debug this file in VSCODE very easily!!
Thank you to read this article and enjoy your coding with F# language!