F# - Start F# language with VSCODE

Dope Flamingo·2023년 1월 7일
0

How-To-F-Sharp

목록 보기
1/1

Firstly You should install .Net Framework and VSCode with Ionide Plugins

1. Create project

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 .

2. Open Program.fs code

You can see below image to edit code

3. Setting Launch/Debug (launch.json)

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.

4. Setting Build (task.json)

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"

5. Start to launch or debug the exe file

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!

profile
How Deep Is Your Learning

0개의 댓글