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

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

DotNetCli

Contains a task which can be used to run dotnet CLI commands.

Nested types and modules

TypeDescription
BuildParams
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

DotNet build parameters

CommandParams
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

DotNet parameters

PackParams
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

DotNet pack parameters

PublishParams
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

DotNet publish parameters

RestoreParams
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

DotNet restore parameters

TestParams
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

DotNet test parameters

Functions and values

Function or valueDescription
Build(setBuildParams)
Signature: setBuildParams:(BuildParams -> BuildParams) -> unit
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Runs the dotnet "build" command.

Parameters

  • setBuildParams - Function used to overwrite the build default parameters.

Sample

1: 
2: 
3: 
4: 
DotNetCli.Build
  (fun p -> 
       { p with 
            Configuration = "Release" })
commandName
Signature: string
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

The dotnet command name

DotnetSDKPath
Signature: string
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

GetDotNetSDKVersionFromGlobalJson()
Signature: unit -> string
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Gets the DotNet SDK from the global.json

getVersion()
Signature: unit -> string
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Gets the installed dotnet version

InstallDotNetSDK(sdkVersion)
Signature: sdkVersion:string -> string
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Installs the DotNet SDK locally to the given path

isInstalled()
Signature: unit -> bool
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Checks wether the dotnet CLI is installed

Pack(setPackParams)
Signature: setPackParams:(PackParams -> PackParams) -> unit
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Runs the dotnet "pack" command.

Parameters

  • setPackParams - Function used to overwrite the pack default parameters.

Sample

1: 
2: 
3: 
4: 
DotNetCli.Pack
  (fun p -> 
       { p with 
            Configuration = "Release" })
Publish(setPublishParams)
Signature: setPublishParams:(PublishParams -> PublishParams) -> unit
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Runs the dotnet "publish" command.

Parameters

  • setPublishParams - Function used to overwrite the publish default parameters.

Sample

1: 
2: 
3: 
4: 
DotNetCli.Publish
  (fun p -> 
       { p with 
            Configuration = "Release" })
Restore(setRestoreParams)
Signature: setRestoreParams:(RestoreParams -> RestoreParams) -> unit
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Runs the dotnet "restore" command.

Parameters

  • setRestoreParams - Function used to overwrite the restore default parameters.

Sample

1: 
2: 
3: 
4: 
DotNetCli.Restore 
    (fun p -> 
         { p with 
              NoCache = true })
RunCommand setCommandParams args
Signature: setCommandParams:(CommandParams -> CommandParams) -> args:string -> unit
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Runs a dotnet command.

Parameters

  • setCommandParams - Function used to overwrite the default parameters.
  • args - command and additional arguments.

Sample

1: 
2: 
3: 
4: 
5: 
DotNetCli.RunCommand
    (fun p -> 
         { p with 
              TimeOut = TimeSpan.FromMinutes 10. })
    "restore"
SetVersionInProjectJson version fileName
Signature: version:string -> fileName:string -> unit
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Sets version in project.json

Test(setTestParams)
Signature: setTestParams:(TestParams -> TestParams) -> unit
Attributes:
[<Obsolete("Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)")>]
OBSOLETE

Please add 'open Fake.DotNet' and use 'DotNet.*' instead, see https://fake.build/dotnet-dotnet.html for an example (the fake 5 module is called Fake.DotNet.Cli)

Runs the dotnet "test" command.

Parameters

  • setTestParams - Function used to overwrite the test default parameters.

Sample

1: 
2: 
3: 
4: 
DotNetCli.Test
  (fun p -> 
       { p with 
            Configuration = "Release" })