Reputation: 7487
I would like to use exercism to solve F# exercises. I do this on Fedora.
Exercism downloads an .fsproj
file. How can I handle it from the command line?
Is there something like the command make
for a Makefile
?
Upvotes: 1
Views: 264
Reputation: 2532
If you have the dotnet SDK installed.
dotnet build X.fsproj
should restore and build the project.
dotnet run X.fsproj
will run it. You can also run it against a .sln file.
dotnet test X.fsproj
will execute your unit tests. Note: Here it reported I only had 1 test file (wrong) but picked up all my tests.
To test if you have it installed and on your PATH, execute: dotnet --version
. The current version is 3.1.
dotnet --help
will show you all possible commands.
Of interest may be that F# Interactive is now baked into the SDK.
dotnet fsi
to enter interactive environment.
#quit;;
to exit interactive environment.
This allows you to play with F# right in the command line.
Upvotes: 4