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

FAKE0001 Use the Fake.Core.Process module instead

ProcessHelper

Contains functions which can be used to start other tools.

Nested types and modules

TypeDescription
ConsoleMessage
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

A record type which captures console messages

ExecParams
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Parameter type for process execution.

ProcessResult
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

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

Shell
OBSOLETE

FAKE0001 Use `open Fake.Core` and `Process.Shell`

Allows to exec shell operations synchronously and asynchronously.

Functions and values

Function or valueDescription
AlwaysSetProcessEncoding
Signature: bool
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

If set to true the ProcessHelper will start all processes with a custom ProcessEncoding. If set to false (default) only mono processes will be changed.

asyncShellExec(args)
Signature: args:ExecParams -> Async<int>
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Execute an external program asynchronously and return the exit code, logging output and error messages to FAKE output. You can compose the result with Async.Parallel to run multiple external programs at once, but be sure that none of them depend on the output of another.

defaultParams
Signature: ExecParams
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Default parameters for process execution.

directExec(configProcessStartInfoF)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> bool
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Runs the given process, waits for its completion and returns if it succeeded.

ensureProcessesHaveStopped name timeout
Signature: name:string -> timeout:TimeSpan -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Waits until the processes with the given name have stopped or fails after given timeout.

Parameters

  • name - The name of the processes in question.
  • timeout - The timespan to time out after.
ExecProcess(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> int
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Runs the given process and returns the exit code.

Parameters

  • configProcessStartInfoF - A function which overwrites the default ProcessStartInfo.

  • timeOut - The timeout for the process.

    Sample

    let result = ExecProcess (fun info -> info.FileName <- "c:/MyProc.exe" info.WorkingDirectory <- "c:/workingDirectory" info.Arguments <- "-v") (TimeSpan.FromMinutes 5.0)

    if result <> 0 then failwithf "MyProc.exe returned with a non-zero exit code"

ExecProcessAndReturnMessages(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> ProcessResult
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Runs the given process and returns the process result.

Parameters

  • configProcessStartInfoF - A function which overwrites the default ProcessStartInfo.
  • timeOut - The timeout for the process.
ExecProcessElevated cmd args timeOut
Signature: cmd:string -> args:string -> timeOut:TimeSpan -> int
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Runs the given process in an elevated context and returns the exit code.

Parameters

  • cmd - The command which should be run in elavated context.
  • args - The process arguments.
  • timeOut - The timeout for the process.
ExecProcessRedirected(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> bool * seq<ConsoleMessage>
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Runs the given process and returns the process result.

Parameters

  • configProcessStartInfoF - A function which overwrites the default ProcessStartInfo.
  • timeOut - The timeout for the process.
ExecProcessWithLambdas(...)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> timeOut:TimeSpan -> silent:bool -> errorF:(string -> unit) -> messageF:(string -> unit) -> int
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Runs the given process and returns the exit code.

Parameters

  • configProcessStartInfoF - A function which overwrites the default ProcessStartInfo.
  • timeOut - The timeout for the process.
  • silent - If this flag is set then the process output is redirected to the given output functions errorF and messageF.
  • errorF - A function which will be called with the error log.
  • messageF - A function which will be called with the message log.
fireAndForget(configProcessStartInfoF)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Starts the given process and returns immediatly.

formatArgs(args)
Signature: args:seq<string * string> -> string
getProcessesByName(name)
Signature: name:string -> seq<Process>
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Returns all processes with the given name

kill(proc)
Signature: proc:Process -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Kills the given process

killAllCreatedProcesses()
Signature: unit -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Kills all processes that are created by the FAKE build script unless "donotkill" flag was set.

killFSI()
Signature: unit -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Kills the F# Interactive (FSI) process.

killMSBuild()
Signature: unit -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Kills the MSBuild process.

killProcess(name)
Signature: name:string -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Kills all processes with the given name

killProcessById(id)
Signature: id:int -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Kills all processes with the given id

pathDirectories
Signature: seq<string>
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Gets the list of valid directories included in the PATH environment variable.

ProcessEncoding
Signature: Encoding
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

The ProcessHelper will start all processes with this encoding if AlwaysSetProcessEncoding is set to true. If AlwaysSetProcessEncoding is set to false (default) only mono processes will be changed.

RunRemoteService(...)
Signature: command:string -> host:string -> serviceName:string -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Sends a command to a remote windows service.

RunService command serviceName
Signature: command:string -> serviceName:string -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Sends a command to a local windows service.

StartProcess(configProcessStartInfoF)
Signature: configProcessStartInfoF:(ProcessStartInfo -> unit) -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Starts the given process and forgets about it.

StartRemoteService host serviceName
Signature: host:string -> serviceName:string -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Starts a remote windows service. Waits up to two minutes for a response.

StartService(serviceName)
Signature: serviceName:string -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Starts a local windows service. Waits up to two minutes for a response.

StopRemoteService host serviceName
Signature: host:string -> serviceName:string -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Stops a remote windows service. Waits up to two minutes for a response.

StopService(serviceName)
Signature: serviceName:string -> unit
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Stops a local windows service. Waits up to two minutes for a response.

tryFindFileOnPath(file)
Signature: file:string -> string option
Attributes:
[<Obsolete("FAKE0001 Use the Fake.Core.Process module instead")>]
OBSOLETE

FAKE0001 Use the Fake.Core.Process module instead

Searches the current directory and the directories within the PATH environment variable for the given file. If successful returns the full path to the file.

Parameters

  • file - The file to locate

Type extensions

Type extensionDescription
x.Clear()
Signature: unit -> unit