Faithlife.Build is a build automation system using C# build scripts.


This library allows developers to use C# to write build scripts. It is similar to Cake and NUKE, but simpler, providing a thin wrapper over some of the libraries acknowledged below.

Most importantly, since the build script is a full-fledged .NET Core app with access to any compatible NuGet package, you can do just about anything, in a language and framework you already know well.


To use this library for your automated build, create a .NET Core Console App project in tools/build that references the latest Faithlife.Build NuGet package. Optionally add the project to your Visual Studio solution file. See Build.csproj for an example project; there are project properties in that file that you may need for everything to work as expected.

The Main method of the console app should call BuildRunner.Execute with the args and a delegate that defines the build targets and any desired command-line options by calling methods on the provided BuildApp.

using Faithlife.Build;
using static Faithlife.Build.DotNetRunner;

internal static class Build
    public static int Main(string[] args) => BuildRunner.Execute(args, build =>
            .Describe("Builds the solution")
            .Does(() => RunDotNet("build", "-c", "Release", "--verbosity", "normal"));

Perform the build by calling dotnet run on the build project, which is most easily done from a simple bootstrapper, typically named build.cmd (for Windows) and/or (for non-Windows).

Consult the full reference documentation for additional details.

Create .NET Targets

To create standard targets for a .NET build, call DotNetBuild.AddDotNetTargets with custom settings as needed. See Build.cs for an example.

The supported targets include:

The supported command-line options include:

The supported DotNetBuildSettings include:

For details on exactly what each target does and how the settings and command-line options affect the build, read the source code.


Special thanks to the libraries and tools used by Faithlife.Build:

Also thanks to Paul Knopf for this article, which inspired us to think beyond Cake.