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


Module to start or run processes, used in combination with the CreateProcess API.


#r "paket: 
nuget Fake.Core.Process //"
open Fake.Core
CreateProcess.fromRawCommand "./folder/mytool.exe" ["arg1"; "arg2"]
|> ignore
namespace Fake
namespace Fake.Core
Multiple items
module CreateProcess

from Fake.Core.CreateProcessExt

module CreateProcess

from Fake.Core.CreateProcessDotNetExt

module CreateProcess

from Fake.Core

type CreateProcess<'TRes> =
  private { InternalCommand: Command
            TraceCommand: bool
            InternalWorkingDirectory: string option
            InternalEnvironment: EnvMap option
            Streams: StreamSpecs
            Hook: IProcessHook<'TRes> }
    member Command : Command
    member CommandLine : string
    member Environment : EnvMap option
    member WorkingDirectory : string option
val fromRawCommand : command:FilePath -> args:seq<string> -> CreateProcess<ProcessResult<unit>>
module Proc

from Fake.Core
val run : c:CreateProcess<'a> -> 'a
val ignore : value:'T -> unit

Functions and values

Function or valueDescription
Signature: c:CreateProcess<'a> -> 'a
Type parameters: 'a

Like start but waits for the result synchronously.

Signature: c:CreateProcess<'?17978> -> Task<'?17978>
Type parameters: '?17978

Starts the given process and waits for the Result task. (see startRaw documentation). In most common scenarios the Result includes the Raw task or the exit-code one way or another.

Signature: c:CreateProcess<'?17980> -> Async<'?17980>
Type parameters: '?17980

Convenience method when you immediatly want to await the result of 'start', just note that when used incorrectly this might lead to race conditions (ie if you use StartAsTask and access reference cells in CreateProcess after that returns)

Signature: c:CreateProcess<'?17974> -> Task<AsyncProcessResult<'?17974>>
Type parameters: '?17974

Starts a process. The process has been started successfully after the returned task has been completed. After the task has been completed you retrieve two other tasks: - One Raw-Task to indicate when the process exited (and return the exit-code for example) - One Result-Task for the final result object.

Note: The Result task might finish while the Raw task is still running, this enables you to work with the result object before the process has exited. For example consider a long running process where you are only interested in the first couple of output lines

Signature: c:CreateProcess<'?17976> -> AsyncProcessResult<'?17976>
Type parameters: '?17976

Similar to startRaw but waits until the process has been started.