FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0
Edit this page

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

F# Make - What is FAKE?

"FAKE - F# Make" is a cross platform automation system, mainly used for builds and releases. Due to its integration in F#, all benefits of the .NET Framework and functional programming can be used, including the extensive class library, powerful debuggers and integrated development environments like Visual Studio or MonoDevelop, which provide syntax highlighting and code completion. We recommend Visual Studio Code with the Ionide extension for best FAKE tooling support.

The new DSL was designed to be succinct, typed, declarative, extensible and easy to use.

See the project home page for tutorials and API documentation.

Why FAKE?

The industry movement towards "DevOps" and "infrastructure as code" leads to the fact that reproducible builds and automation becomes more and more important for basically every project. Question is: Why do we build our automations in "old" and error-prone scripting languages like bash, cmd or powershell instead of a full featured language with IDE support, static typing and compile-time errors? We believe there are different answers to that:

FAKE addresses the problem in the following ways:

When should I use FAKE?

Use FAKE in the following ways:

Try to not use fake:

Using a fake module is preferred over calling external processes directly.

Examples:

How can I get started

With our getting-started guides.

What is the migration path?

See Fake 5 Migration Guide

How to specify dependencies?

See the FAKE 5 modules section.

How does debugging work?

See the Debugging user guide

What is a FAKE package and a FAKE module?

Some of the documentation talk about FAKE packages and some about FAKE modules. Strictly speaking there is no difference and both are usually tied to a particular NuGet package. The confusion arises as F# talks about modules (static classes) and usually a FAKE NuGet package contains a single F# module. So the term module should be used for code fragments while package for NuGet packages.

Can FAKE code be used from a regular F# project

Yes indeed! You can just use all the different FAKE packages, like Fake.Core.Environment. The API reference will list the NuGet package you need to install right at the top. Some/most of the FAKE-APIs will complain about a missing context, to initialize one you can use

let execContext = Fake.Core.Context.FakeExecutionContext.Create false "build.fsx" []
Fake.Core.Context.setExecutionContext (Fake.Core.Context.RuntimeContext.Fake execContext)

If you believe a particular API should not need the context please feel free to open an issue for discussion or a PR with a fix!