This sample demonstrates how to use the MiniScaffold template to create an F# console application for dotnet core.
-
Install the MiniScaffold template by running this CLI command:
dotnet new -i "MiniScaffold::*"
-
Create a new project by running this CLI command:
dotnet new mini-scaffold -lang f# -n mini-scaffold-sample --githubUsername ScottHutchinson
-
Add this line above the TargetFrameworks element in the .fsproj file:
<OutputType>Exe</OutputType>
-
Rename the file Library.fs as Program.fs (not strictly necessary).
-
Change the namespace to a module instead.
-
Add this function:
[<EntryPoint>] let main argv = printfn "Hello World from Mini Scaffold!" 0 // return an integer exit code
-
Change the target framework from multiple targets to a single target:
<TargetFramework>netcoreapp2.0</TargetFramework>
-
Add this line to the top of the paket.dependencies file to specify a particular version of paket:
version 5.148.0
https://github.com/TheAngryByrd/MiniScaffold
https://fsprojects.github.io/Paket/bootstrapper.html#Magic-mode