View on GitHub

AnFake = Another F# Make

Provides alternative to TFS build process templates. Using AnFake you can define your build with F#/C# script instead of XAML. Supports TFS 2012 and 2013.

How Is This Look Like?

Lets look at a Demo solution:

\Demo
  \Demo.App
  \Demo.Lib
  \Demo.Lib.Test
  - Demo.sln
  - build.fsx      

The build.fsx defines build steps:

Tfs.PlugIn()
let out = ~~".out"
let productOut = out / "product"
let testsOut = out / "tests"
let tests = !!"*/*.Test.csproj"
let product = 
    !!"*/*.csproj"
                - tests
"Clean" => (fun _ ->    
                let obj = !!!"*/obj"
                let bin = !!!"*/bin"
                Folders.Clean obj
                Folders.Clean bin
                Folders.Clean out
)
"Compile" => (fun _ ->
                MsBuild.BuildRelease(product, productOut)
                MsBuild.BuildRelease(tests, testsOut)
)
"Test.Unit" => (fun _ -> 
                VsTest.Run(
        testsOut % "*.Test.dll")
)
"Test" <== ["Test.Unit"]
"Build" <== ["Compile"; "Test"]

You can run build either locally...

\Projects\Demo\dev> anf Clean Compile

AnFake Local Run

...or on Team Build server

AnFake Team Build Run

Benefits

How to Get AnFake

AnFake is available on NuGet. To install the tool, run the following command in the Package Manager Console:
PM> Install-Package AnFake

Getting Started