INFO

This API documentation is for FAKE version 5.0 or later. The old API documentation can be found here for migration or here for fake 4

FAKE - F# Make

Fake Namespace

ModuleDescription
Profile

Fake.Api Namespace

ModuleDescription
GitHub

Contains tasks to interact with GitHub releases

Sample

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
   Target.create "GitHubRelease" (fun _ ->
       let token =
           match Environment.environVarOrDefault "github_token" "" with
           | s when not (System.String.IsNullOrWhiteSpace s) -> s
           | _ -> failwith "please set the github_token environment variable to a github personal access token with repro access."

       let files =
           runtimes @ [ "portable"; "packages" ]
           |> List.map (fun n -> sprintf "release/dotnetcore/Fake.netcore/fake-dotnetcore-%s.zip" n)

       GitHub.createClientWithToken token
       |> GitHub.draftNewRelease gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
       |> GitHub.uploadFiles files
       |> GitHub.publishDraft
       |> Async.RunSynchronously)
val not : value:bool -> bool
namespace System
Multiple items
type String =
  new : value:char -> string + 7 overloads
  member Chars : int -> char
  member Clone : unit -> obj
  member CompareTo : value:obj -> int + 1 overload
  member Contains : value:string -> bool
  member CopyTo : sourceIndex:int * destination:char[] * destinationIndex:int * count:int -> unit
  member EndsWith : value:string -> bool + 2 overloads
  member Equals : obj:obj -> bool + 2 overloads
  member GetEnumerator : unit -> CharEnumerator
  member GetHashCode : unit -> int
  ...

--------------------
System.String(value: nativeptr<char>) : System.String
System.String(value: nativeptr<sbyte>) : System.String
System.String(value: char []) : System.String
System.String(c: char, count: int) : System.String
System.String(value: nativeptr<char>, startIndex: int, length: int) : System.String
System.String(value: nativeptr<sbyte>, startIndex: int, length: int) : System.String
System.String(value: char [], startIndex: int, length: int) : System.String
System.String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: System.Text.Encoding) : System.String
System.String.IsNullOrWhiteSpace(value: string) : bool
val failwith : message:string -> 'T
Multiple items
module List

from Microsoft.FSharp.Collections

--------------------
type List<'T> =
  | ( [] )
  | ( :: ) of Head: 'T * Tail: 'T list
    interface IReadOnlyCollection<'T>
    interface IEnumerable
    interface IEnumerable<'T>
    member GetSlice : startIndex:int option * endIndex:int option -> 'T list
    member Head : 'T
    member IsEmpty : bool
    member Item : index:int -> 'T with get
    member Length : int
    member Tail : 'T list
    static member Cons : head:'T * tail:'T list -> 'T list
    ...
val map : mapping:('T -> 'U) -> list:'T list -> 'U list
val sprintf : format:Printf.StringFormat<'T> -> 'T
union case Option.None: Option<'T>
Multiple items
type Async =
  static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
  static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
  static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
  static member AwaitTask : task:Task -> Async<unit>
  static member AwaitTask : task:Task<'T> -> Async<'T>
  static member AwaitWaitHandle : waitHandle:WaitHandle * ?millisecondsTimeout:int -> Async<bool>
  static member CancelDefaultToken : unit -> unit
  static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
  static member Choice : computations:seq<Async<'T option>> -> Async<'T option>
  static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
  ...

--------------------
type Async<'T> =
static member Async.RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:System.Threading.CancellationToken -> 'T
HockeyApp

Contains tasks to interact with HockeyApp

Slack

Contains a task to send notification messages to a Slack webhook

Fake.Azure Namespace

ModuleDescription
CloudServices

Contains tasks to package Azure Cloud Services.

Note: This documentation is for FAKE version 5.0 or later. The old documentation can be found here

Emulators

Contains tasks to control the local Azure Emulator

Kudu

Contains tasks to stage and deploy Azure website and webjobs using source code deployment with Kudu Sync.

WebJobs

Contains tasks to package and deploy Azure Web Jobs via the Kudu Zip controller

Note: This documentation is for FAKE version 5.0 or later. The old documentation can be found here

Fake.BuildServer Namespace

Fake.Core Namespace

TypeDescription
BuildServer

The server type option.

BuildServerInstaller
TraceMode

The trace mode option.

Arguments
Command
ConsoleMessage

A record type which captures console messages

CreateProcess<'TRes>
DataRef<'T>
ExecParams

Parameter type for process execution.

FilePath
IProcessHook
IProcessStarter
ProcStartInfo
ProcessOutput
ProcessResult

A process result including error code, message log and errors.

ProcessResults<'a>
RawCreateProcess
ResultGenerator<'TRes>
Shell

Allows to exec shell operations synchronously and asynchronously.

StreamRef
StreamSpecification
ConsoleTraceListener

Implements a TraceListener for System.Console.

DotNetCoverageTool
ITraceListener

Defines a TraceListener interface

ImportData
KnownTags
NunitDataVersion
TagStatus
TestStatus
TraceData

Defines Tracing information for TraceListeners

TraceSecret
Docopt
DocoptException
DocoptMap
DocoptResult
PreRelease

Information about PreRelease packages.

PreReleaseSegment
SemVerInfo

Contains the version information.

BuildFailedException

Exception for request errors

TargetContext
TargetParameter
TargetResult
ModuleDescription
Context

This module tracks the context of the build. This allows us to run some modules without any context and change behavior depending on the context (For example Fake.Process kills all processes when the Fake Context exists, but it should not when used as library)

BuildServer
Environment
Operators
FakeVar

This module contains helpers for managing build time variables

Args
CreateProcess
Mono
Proc
ProcStartInfoExtensions
Process
RawProc
StreamExtensions
String

Contains basic functions for string manipulation.

StringBuilder
ConsoleWriter
CoreTracing
TestStatus
Trace

This module contains function which allow to trace build output

TraceData
TraceSecrets
Xml

Contains functions to read and write XML files.

DocHelper
DocoptResult
Changelog

Contains helpers which allow to parse Change log text files. These files have to be in a format as described on http://keepachangelog.com/en/0.1.0/

ReleaseNotes

Contains helpers which allow to parse Release Notes text files. Either "simple" or "complex" format is accepted.

SemVer

Parser which allows to deal with Semantic Versioning (SemVer).

SemVerActivePattern

Contains active patterns which allow to deal with Semantic Versioning (SemVer).

Target
TargetOperators

Provides functions and operators to deal with FAKE targets and target dependencies.

TaskRunner

Contains a helper which can be used to implement timeouts and retries.

UserInput

Helpers for capturing user input

Fake.Core.CommandLineParsing Namespace

Fake.Documentation Namespace

ModuleDescription
DocFx

Contains helper functions to use DocFx https://dotnet.github.io/docfx/.

Fake.DotNet Namespace

TypeDescription
AssemblyInfoFileConfig

Represents options for configuring the emission of AssemblyInfo

BuildException
OBSOLETE

Using this is a BUG as this exception is no longer thrown! Use MSBuildException instead!

MSBuildDistributedLoggerConfig
MSBuildEntry
MSBuildException

An exception type to signal build errors.

MSBuildFileLoggerConfig

A type for MSBuild configuration

MSBuildLogParameter

MSBuild log option

MSBuildParams

A type for MSBuild task parameters

MSBuildProject

A type to represent MSBuild project files.

MSBuildVerbosity

MSBuild verbosity option

ModuleDescription
AssemblyInfo
AssemblyInfoFile
DotNet
Fsc

Contains tasks to compiles F# source file with the FSharp.Compiler.Service.

Note: This documentation is for FAKE version 5.0 or later. The old documentation can be found here

FSFormatting

Contains tasks which allow to run FSharp.Formatting for generating documentation.

Fsi
MSBuild
MSBuildLogger

Contains Logger implementations for MSBuild.

Mage

Contains helper functions which allow FAKE to call the Manifest Generation and Editing Tool, in short 'MAGE'. The intentional use is the creation of a clickonce application.

Paket

Contains helper functions and task which allow to inspect, create and publish NuGet packages with Paket.

PaketTemplate

Contains helper functions and task which allow it to generate a paket.template file for Paket

Xamarin

Contains tasks for building Xamarin.iOS and Xamarin.Android apps

Fake.DotNet.NuGet Namespace

ModuleDescription
Install

Contains tasks for installing NuGet packages using the nuget.exe install command.

NuGet

Contains helper functions and task which allow to inspect, create and publish NuGet packages. There is also a tutorial about nuget package creating available.

Restore

Contains tasks which allow to restore NuGet packages from a NuGet package feed like nuget.org. There is also a tutorial about nuget package restore available.

Update

Contains tasks for updating NuGet packages including assembly hint paths in the project files using the nuget.exe update command.

Version

Fake.DotNet.Testing Namespace

ModuleDescription
Expecto

Contains tasks to run Expecto unit tests.

MSpec

Contains a task to run machine.specifications tests.

MSTest

Contains tasks to run MSTest unit tests.

NUnit3

Contains tasks to run NUnit unit tests in parallel.

OpenCover

Contains a task which can be used to run OpenCover on .NET assemblies.

SpecFlow

Contains a task which allows to run SpecFlow tests.

XUnit2

Contains tasks to run xUnit v2 unit tests.

Fake.DotNet.Testing.NUnit Namespace

ModuleDescription
Common

Contains types and utility functions relaited to running NUnit unit tests.

Parallel

Contains tasks to run NUnit unit tests in parallel.

Sequential

Contains tasks to run NUnit unit tests.

Xml

Contains types and functions for working with NUnit unit tests result xml.

Fake.IO Namespace

TypeDescription
FileChange
FileStatus
IGlobbingPattern
ModuleDescription
ChangeWatcher

This module is part of the Fake.IO.FileSystem package

Directory
DirectoryInfo
File
FileFilter
FileInfo
FileSystemInfo
FileSystemOperators
GlobbingPattern
GlobbingPatternExtensions
Path

Contains helper function which allow to deal with files and directories.

Shell
Templates

NOTE: Maybe this should be an extra module? Contains basic templating functions. Used in other helpers.

Zip

This module contains helper function to create and extract zip archives.

Fake.IO.Globbing Namespace

TypeDescription
FileIncludes
OBSOLETE

Please use IGlobbingPattern instead

LazyGlobbingPattern
ResolvedGlobbingPattern
ModuleDescription
FileIncludes
OBSOLETE

Please use GlobbingPattern instead

Glob

This module contains a file pattern globbing implementation. This module is part of the Fake.IO.FileSystem package

Operators

Contains operators to find and process files. This module is part of the Fake.IO.FileSystem package

Simple glob using as list

1: 
2: 
3: 
4: 
5: 
6: 
#r "paket: nuget Fake.IO.FileSystem //"
open Fake.IO.Globbing.Operators
let csProjectFiles = !! "src/*.csproj"

for projectFile in csProjectFiles do
    printf "F# ProjectFile: %s" projectFile

Combine globs

1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
#r "paket: nuget Fake.IO.FileSystem //"
open Fake.IO.Globbing.Operators
let projectFiles =
    !! "src/*/*.*proj"
    ++ "src/*/*.target"
    -- "src/*/*.vbproj"

for projectFile in projectFiles do
    printf "ProjectFile: %s" projectFile

Forward globs to tasks

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
#r "paket:
nuget Fake.Core.Target
nuget Fake.IO.FileSystem //"
open Fake.Core
open Fake.IO
open Fake.IO.Globbing.Operators
Target.create "Clean" (fun _ ->
   !! "src/*/*/obj/**/*.nuspec"
   |> File.deleteAll
)
namespace Fake
namespace Fake.IO
namespace Fake.IO.Globbing
module Operators

from Fake.IO.Globbing
val csProjectFiles : Fake.IO.IGlobbingPattern
val projectFile : string
val printf : format:Printf.TextWriterFormat<'T> -> 'T
val projectFiles : Fake.IO.IGlobbingPattern
namespace Fake.Core
Multiple items
module Target

from Fake.Core

--------------------
type Target =
  {Name: string;
   Dependencies: string list;
   SoftDependencies: string list;
   Description: TargetDescription option;
   Function: TargetParameter -> unit;}
    member DescriptionAsString : TargetDescription
val create : name:string -> body:(TargetParameter -> unit) -> unit
module File

from Fake.IO
val deleteAll : files:seq<string> -> unit
Tools

Fake.Installer Namespace

ModuleDescription
InnoSetup

This module contains helper functions to create Inno Setup installers.

Fake.JavaScript Namespace

ModuleDescription
Npm

Helpers to run the npm tool.

Yarn

Helpers for running the yarn tool

Fake.Net Namespace

ModuleDescription
Http

HTTP Client for downloading files

Fake.Runtime Namespace

ModuleDescription
CompileRunner

Contains helper functions which allow to interact with the F# Interactive.

Environment

This module contains functions which allow to read and write environment variables and build parameters

FSharpParser
HashGeneration

Contains helper functions which allow to interact with the F# Interactive.

LegacyApiHelper
Path

Contains basic functions for string manipulation.

Runners

Contains helper functions which allow to interact with the F# Interactive.

ScriptRunner

Contains helper functions which allow to interact with the F# Interactive.

String

Contains basic functions for string manipulation.

Trace

This module contains function which allow to trace build output

Fake.Sql Namespace

ModuleDescription
DacPac

Contains helpers around deploying databases.

Fake.SystemHelper Namespace

ModuleDescription
Environment

Fake.Testing Namespace

ModuleDescription
Common
ReportGenerator

Contains a task which can be used to run ReportGenerator, which converts XML reports generated by PartCover, OpenCover or NCover into a readable report in various formats.

SonarQube

Contains a task to run the msbuild runner of SonarQube analyzer.

Fake.Tools Namespace

ModuleDescription
GitVersion
Pickles

Contains tasks to run the Pickles living documentation generator

Fake.Tools.Git Namespace

ModuleDescription
Branches

Contains helper functions which allow to deal with git branches.

CommandHelper

Contains helpers which allow to interact with git via the command line.

Commit

Contains helper functions which allow to commit to git repositories.

CommitMessage

Contains helper functions which allow to get and set the git commit message.

FileStatus

Contains helper functions which can be used to retrieve file status information from git.

Information

Contains helper functions which can be used to retrieve status information from git.

Merge

Contains helper functions which allow to deal with git merge.

Rebase

Contains helper functions which allow to deal with git rebase.

Repository

Contains functions which allow basic operations on git repositories. All operations assume that the CommandHelper can find git.exe.

Reset

Contains helper functions which allow to deal with git reset.

SHA1

Contains functions which allow the SHA1 of a file with git and without it.

SanityChecks

Contains helper function which can be used for sanity checks.

Staging

Contains helper functions which allow to deal with git's staging area.

Stash

Contains helper functions which allow to deal with git stash.

Submodule

Contains helper functions which allow to deal with git submodules.

Fake.Windows Namespace

ModuleDescription
Choco

Contains tasks which allow to call Chocolatey

Registry

Contains functions which allow to read and write information from/to the registry.

Yaaf.FSharp.Scripting Namespace

TypeDescription
OutputData
ModuleDescription
Log