Skip to content
/ FsTemplate Public template

Template for F# project with .NET Core 3.0

License

Notifications You must be signed in to change notification settings

wraikny/FsTemplate

Repository files navigation

FsTemplate

Template for F# project, distributed under MIT License

FsTemplate Usage

  1. Click the above [Use this Template] button in GitHub website.

  2. Clone your project

    $ git clone <URL>
    $ cd <ProjectName>
  3. Setup Template

    $ dotnet tool restore
    $ dotnet fake build -t Setup # update tools and dependencies, remove sample projects
  4. Change CI Badges in README.md

    • Replace wraikny/FsTemplate to <OWNER>/<REPO>
    • Set your own AppVeyor badge ID
    • If you don't use a CI service, comment out it from the below table.
  5. Create Your project: Create Project

  6. Remove this FsTemplate Usage from here

  7. $ git add --all
    $ git commit --amend # as initial commit

CI Status

Github Actions
Travis CI
AppVeyor

Requirements

.NET Core 3.1
https://dotnet.microsoft.com/download

$ dotnet --version
3.1.201

CLI

Restoring after Clone

$ dotnet tool restore

Build

$ dotnet fake build # Build all projects as Release
$ # or
$ dotnet build --project src/SampleApp [-c {Debug|Release}]

Run

$ dotnet run --project src/SampleApp [-c {Debug|Release}]

Tests

$ dotnet fake build -t Test
$ #or
$ dotnet run --project tests/SampleTest

References

Scripting at build.fsx.

$ dotnet fake build -t Clean # Run "Clean" Target
$ dotnet fake build # Run Default Taret

Create Project

$ # Application
$ dotnet new console -lang=f# -o src/SampleApp

$ # Library
$ dotnet new classlib -lang=f# -o src/SampleLib

Create Test Project

$ dotnet new console -lang=f# -o tests/SampleTest
$ cd tests/SampleTest
$ dotnet add package Expecto
$ dotnet add package Expecto.FsCheck

and then, Add Project Name to build.fsx.

Create Solution

$ dotnet new sln
$ dotnet sln add src/SampleApp
$ dotnet sln add src/SampleLib

Update Tool

$ dotnet fake build -t Tool

and then, commit .config/dotnet-tools.json.

Link

About

Template for F# project with .NET Core 3.0

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages