FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Fsi Module

Contains tasks to interact with F# interactive

Types

Type Description

DebugTypes

Specify debugging type: full, portable, embedded, pdbonly. (pdbonly is the default if no debugging type specified and enables attaching a debugger to a running program, portable is a cross-platform format, c>embedded is a cross-platform format embedded into the output file).

FsiParams

FSI command line parameters. Please see F# Interactive options

FsiTool

Profile

Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib

Functions and values

Function or value Description

Fsi.exec fsiParams script scriptArgs

Full Usage: Fsi.exec fsiParams script scriptArgs

Parameters:
    fsiParams : FsiParams -> FsiParams - Function used to override FSI parameters
    script : string - The F# script to execute
    scriptArgs : string list - Any script arguments

Returns: int * string list

Executes the internal fsi within FSC on the given script Returns error code and an exception message if any exceptions were thrown

fsiParams : FsiParams -> FsiParams

Function used to override FSI parameters

script : string

The F# script to execute

scriptArgs : string list

Any script arguments

Returns: int * string list
Example

e.g: Passing some arguments to fsi, along with the script and some args to be passed to the script


 let fsiExe = "path/to/fsi.exe"
     let script = "MyScript.fsx"
     let (exitcode,msgs) =
         Fsi.exec (fun p ->
             { p with
                 TargetProfile = Fsi.Profile.NetStandard
                 WorkingDirectory = "path/to/WorkingDir"
                 ToolPath = FsiTool.External fsiExe
             }
             |> Process.setEnvironmentVariable "SOME_VAR" "55"
             |> Process.setEnvironmentVariable "GIT" "path/to/git") script ["stuff";"10"]