I figured out how to do this:
1. install dotnet as described https://www.microsoft.com/net/core#macos
2. In the exercise launch folder
dotnet new --lang f
3. Rename Program.fs name of the exercise, for example. HelloWorld.fs
4. Change project.json to
{ "version": "1.0.0-*", "buildOptions": { "debugType": "portable", "emitEntryPoint": true, "compilerName": "fsc", "compile": { "includeFiles": [ "HelloWorld.fs", "HelloWorldTest.fs" ] } }, "dependencies": { "NUnit": "3.4.1", "dotnet-test-nunit": "3.4.0-beta-2" }, "tools": { "dotnet-compile-fsc": "1.0.0-preview2-*" }, "frameworks": { "netcoreapp1.0": { "imports": "portable-net45+win8", "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.1" }, "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629" } } }, "testRunner": "nunit" }
This includes a nunit dependency.
Note includeFiles , this should include the source code file for the exercise and the test file. e.g. HelloWorld.fs and HelloWorldTest.fs
5. Install the necessary packages by running
dotnet restore
6. Add your code to a previously renamed source file, for example. HelloWorld.fs
7. Finally, run the test by running
dotnet test
source share