Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

FscHelper

Contains tasks to compiles F# source file with the FSharp.Compiler.Service. There is also a tutorial about the F# compiler tasks available.

Nested types and modules

TypeDescription
Access

Used to set the Accessiblity of an embeded or linked resource

DebugType

Specify debugging type: full, pdbonly. ('full' is the default and enables attaching a debugger to a running program).

FscParam
FscParams
OBSOLETE

Use FscHelper.FscParam instead

'fsc.exe' command line parameters

FscPlatform
OBSOLETE

Use FscHelper.PlatformType instead

The 'fsc.exe' output platforms

FscTarget
OBSOLETE

Use the FscHelper.TargetType instead

The 'fsc.exe' output target types

Optimization

Optimization options that can be disabled or enabled selectively by listing them with the optimize compiler flag

PlatformType

Limit which platforms the compiled code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu.

Profile

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

ResourceInfo

Specified path of a managed resource with an optional name alias and accessiblity flag resinfo format is [,[,public|private]] e.g. resource.dat,rezName,public

TargetType

Functions and values

Function or valueDescription
compile fscParams inputFiles
Signature: fscParams:FscParam list -> inputFiles:string list -> int

Compiles the given F# source files with the specified parameters.

Parameters

  • setParams - Function used to overwrite the default Fsc parameters.
  • inputFiles - The F# input files.

Returns

The exit status code of the compile process.

Sample

1: 
2: 
3: 
4: 
5: 
6: 
7: 
["file1.fs"; "file2.fs"]
|> compile [Out "" 
            Target Exe
            Platform AnyCpu
            References []
            Debug false 
        ]
Compile fscParams inputFiles
Signature: fscParams:FscParam list -> inputFiles:string list -> unit

Compiles one or more F# source files with the specified parameters.

Parameters

  • setParams - Function used to overwrite the default Fsc parameters.
  • inputFiles - The F# input files.

Sample

1: 
2: 
3: 
4: 
5: 
6: 
7: 
["file1.fs"; "file2.fs"]
|> Compile [Out "" 
            Target Exe
            Platform AnyCpu
            References []
            Debug false 
        ]
compileFiles srcFiles opts
Signature: srcFiles:string list -> opts:string list -> int

Compiles the given source file with the given options. If no options given (i.e. the second argument is an empty list), by default tries to behave the same way as would the command-line 'fsc.exe' tool.

fsc setParams inputFiles
Signature: setParams:(FscParams -> FscParams) -> inputFiles:string list -> int
Attributes:
[<Obsolete("Use FscHelper.compile instead")>]
OBSOLETE

Use FscHelper.compile instead

Compiles the given F# source files with the specified parameters.

Parameters

  • setParams - Function used to overwrite the default Fsc parameters.
  • inputFiles - The F# input files.

Returns

The exit status code of the compile process.

Sample

1: 
2: 
3: 
4: 
5: 
["file1.fs"; "file2.fs"]
|> fsc (fun parameters ->
         { parameters with Output = ...
                           FscTarget = ...
                           ... })
Fsc setParams inputFiles
Signature: setParams:(FscParams -> FscParams) -> inputFiles:string list -> unit
Attributes:
[<Obsolete("Use FscHelper.Compile instead")>]
OBSOLETE

Use FscHelper.Compile instead

Compiles one or more F# source files with the specified parameters.

Parameters

  • setParams - Function used to overwrite the default Fsc parameters.
  • inputFiles - The F# input files.

Sample

1: 
2: 
3: 
4: 
5: 
["file1.fs"; "file2.fs"]
|> Fsc (fun parameters ->
              { parameters with Output = ...
                                FscTarget = ...
                                ... })
fscList srcFiles opts
Signature: srcFiles:string list -> opts:string list -> int
Attributes:
[<Obsolete("Use FscHelper.compileFiles instead")>]
OBSOLETE

Use FscHelper.compileFiles instead

Compiles the given source file with the given options. If no options given (i.e. the second argument is an empty list), by default tries to behave the same way as would the command-line 'fsc.exe' tool.

resourceStr(arg1, arg2, arg3)
Signature: (string * string option * Access option) -> string