Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - module: Fake.Core.Target)

TargetHelper

Contains infrastructure code and helper functions for FAKE's target feature.

Nested types and modules

TypeDescription
BuildError
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.BuildError)

Represents build errors

Target
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - type: Fake.Core.Target.Target)

A Target can be run during the build

ModuleDescription
ExitCode
OBSOLETE

Please open an issue and tell us why you need it! (FAKE0002 - no longer supported)

Functions and values

Function or valueDescription
( <== ) x ys
Signature: x:string -> ys:string list -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - open Fake.Core.TargetOperators)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - open Fake.Core.TargetOperators)

Backwards dependencies operator - x is dependent on ys.

ActivateBuildFailureTarget(name)
Signature: name:string -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ActivateBuildFailure)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ActivateBuildFailure)

Activates the BuildFailureTarget.

ActivateFinalTarget(name)
Signature: name:string -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ActivateFinal)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ActivateFinal)

Activates the FinalTarget.

addExecutedTarget target time
Signature: target:string -> time:TimeSpan -> unit
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

BuildFailureTarget name body
Signature: name:string -> body:(unit -> unit) -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.CreateBuildFailure)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.CreateBuildFailure)

Registers a BuildFailureTarget (not activated).

BuildFailureTargets
Signature: Dictionary<string,bool>
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

BuildFailureTargets - stores build failure targets and if they are activated.

CurrentTarget
Signature: string
Attributes:
[<Obsolete("Please open an issue and tell us why you need it! (FAKE0002 - package: Fake.Core.Target - no longer supported)")>]
OBSOLETE

Please open an issue and tell us why you need it! (FAKE0002 - package: Fake.Core.Target - no longer supported)

CurrentTargetOrder
Signature: string list list
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

dependencyString(target)
Signature: target:'?10914 TargetTemplate -> string
Type parameters: '?10914 Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Returns the DependencyString for the given target.

determineBuildOrder target parallelJobs
Signature: target:string -> parallelJobs:int -> unit TargetTemplate [] list
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.determineBuildOrder)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.determineBuildOrder)

Determines a parallel build order for the given set of targets

doesTargetMeanListTargets(target)
Signature: target:string -> bool
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

DoNothing()
Signature: unit -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.DoNothing)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.DoNothing)

Do nothing - fun () -> () - Can be used to define empty targets.

ExecutedTargets
Signature: HashSet<string>
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

The executed targets.

FinalTarget name body
Signature: name:string -> body:(unit -> unit) -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.CreateFinal)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.CreateFinal)

Registers a final target (not activated).

FinalTargets
Signature: Dictionary<string,bool>
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Final Targets - stores final targets and if they are activated.

getAllTargetsNames()
Signature: unit -> string list
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Returns a list with all target names.

GetErrors()
Signature: unit -> BuildError list
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Get Errors - Returns the errors that occured during execution

getTarget(name)
Signature: name:string -> unit TargetTemplate
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Get)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Get)

Gets a target with the given name from the target dictionary.

listTargets()
Signature: unit -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ListAvailable)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ListAvailable)

List all available targets.

PrintDependencyGraph verbose target
Signature: verbose:bool -> target:string -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.PrintDependencyGraph)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.PrintDependencyGraph)

Writes a dependency graph.

PrintDotDependencyGraph()
Signature: unit -> unit
Attributes:
[<Obsolete("Not yet migrated, waiting for your contribution ;) (FAKE0004 - package: Fake.Core.Target - member: Fake.Core.Target.PrintDotDependencyGraph to be created)")>]
OBSOLETE

Not yet migrated, waiting for your contribution ;) (FAKE0004 - package: Fake.Core.Target - member: Fake.Core.Target.PrintDotDependencyGraph to be created)

Writes a dependency graph of all targets in the DOT format.

PrintRunningOrder()
Signature: unit -> unit
Attributes:
[<Obsolete("Not yet migrated, waiting for your contribution ;) (FAKE0004 - package: Fake.Core.Target - member: Fake.Core.Target.PrintRunningOrder to be created)")>]
OBSOLETE

Not yet migrated, waiting for your contribution ;) (FAKE0004 - package: Fake.Core.Target - member: Fake.Core.Target.PrintRunningOrder to be created)

PrintTargets()
Signature: unit -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ListAvailable)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.ListAvailable)

Prints all targets.

run(targetName)
Signature: targetName:string -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Run)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Run)

Runs a target and its dependencies.

runSingleTarget(target)
Signature: target:unit TargetTemplate -> unit
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Runs a single target without its dependencies

runTargets(targets)
Signature: targets:unit TargetTemplate array -> unit
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

runTargetsParallel count targets
Signature: count:int -> targets:Target [] -> unit
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Runs the given array of targets in parallel using count tasks

softDependencyString(target)
Signature: target:'?10916 TargetTemplate -> string
Type parameters: '?10916 Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Returns the soft DependencyString for the given target.

Target name body
Signature: name:string -> body:(unit -> unit) -> unit
Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Create)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.Create)

Creates a Target.

TargetTemplate(body)
Signature: body:('?10938 -> unit) -> string -> '?10938 -> unit
Type parameters: '?10938 Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case. Note you can create Template with functions that Target.Create using a closure on function parameters + defines dependencies with TargetOperators.")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case. Note you can create Template with functions that Target.Create using a closure on function parameters + defines dependencies with TargetOperators.

Creates a TargetTemplate.

TargetTemplateWithDependecies(...)
Signature: dependencies:string list -> ('?10936 -> unit) -> string -> '?10936 -> unit
Type parameters: '?10936 Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case. Note you can create Template with functions that Target.Create using a closure on function parameters + defines dependencies with TargetOperators.")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case. Note you can create Template with functions that Target.Create using a closure on function parameters + defines dependencies with TargetOperators.

TargetTemplateWithDependencies(...)
Signature: dependencies:string list -> body:('?10934 -> unit) -> name:string -> parameters:'?10934 -> unit
Type parameters: '?10934 Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case. Note you can create Template with functions that Target.Create using a closure on function parameters + defines dependencies with TargetOperators.")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case. Note you can create Template with functions that Target.Create using a closure on function parameters + defines dependencies with TargetOperators.

Creates a TargetTemplate with dependencies.

Sample

The following sample creates 4 targets using TargetTemplateWithDependencies and hooks them into the build pipeline.

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
30: 
31: 
32: 
// Create target creation functions
let createCompileTarget name strategy =
TargetTemplateWithDependencies
    ["Clean"; "ResolveDependencies"] // dependencies to other targets
    (fun targetParameter ->
      tracefn "--- start compile product..."
      if targetParameter = "a" then
        tracefn "    ---- Strategy A"
      else
        tracefn "    ---- Strategy B"
      tracefn "--- finish compile product ..."
    ) name strategy

let createTestTarget name dependencies filePattern =
  TargetTemplateWithDependencies
    dependencies
    (fun filePattern ->
      tracefn "--- start compile tests ..."
      !! filePattern
      |> RunTests
      tracefn "--- finish compile tests ...")
    name filePattern

// create some targets
createCompileTarget "C1" "a"
createCompileTarget "C2" "b"

createTestTarget "T1" ["C1"] "**/C1/*.*"
createTestTarget "T2" ["C1"; "C2"] "**/C?/*.*"

// hook targets to normal build pipeline
"T1" ==> "T2" ==> "Test"
val createCompileTarget : name:'a -> strategy:'b -> obj
val name : 'a
val strategy : 'b
val createTestTarget : ('c -> 'd -> 'e -> 'f)
val name : 'c
val dependencies : 'd
val filePattern : 'e
WriteErrors()
Signature: unit -> unit
Attributes:
[<Obsolete("Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case")>]
OBSOLETE

Internal state is no more accessible now (FAKE0003 - package: Fake.Core.Target). If you consider, it is still useful, please open an issue and explain your use case

Writes a summary of errors reported during build.

WriteTaskTimeSummary(total)
Signature: total:'?10965 -> unit
Type parameters: '?10965 Attributes:
[<Obsolete("Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.WriteTaskTimeSummary)")>]
OBSOLETE

Use Fake.Core.Target instead (FAKE0001 - package: Fake.Core.Target - member: Fake.Core.Target.WriteTaskTimeSummary)

Writes a build time report.