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
DotNetCli
Contains a task which can be used to run dotnet CLI commands.
Nested types and modules
Type | Description |
BuildParams |
DotNet build parameters |
CommandParams |
DotNet parameters |
PackParams |
DotNet pack parameters |
PublishParams |
DotNet publish parameters |
RestoreParams |
DotNet restore parameters |
TestParams |
DotNet test parameters |
Functions and values
Function or value | Description | ||
Build(setBuildParams)
Signature: setBuildParams:(BuildParams -> BuildParams) -> unit
|
Runs the dotnet "build" command. Parameters
Sample
|
||
commandName
Signature: string
|
The dotnet command name |
||
DotnetSDKPath
Signature: string
|
|||
GetDotNetSDKVersionFromGlobalJson()
Signature: unit -> string
|
Gets the DotNet SDK from the global.json |
||
getVersion()
Signature: unit -> string
|
Gets the installed dotnet version |
||
InstallDotNetSDK(sdkVersion)
Signature: sdkVersion:string -> string
|
Installs the DotNet SDK locally to the given path |
||
isInstalled()
Signature: unit -> bool
|
Checks wether the dotnet CLI is installed |
||
Pack(setPackParams)
Signature: setPackParams:(PackParams -> PackParams) -> unit
|
Runs the dotnet "pack" command. Parameters
Sample
|
||
Publish(setPublishParams)
Signature: setPublishParams:(PublishParams -> PublishParams) -> unit
|
Runs the dotnet "publish" command. Parameters
Sample
|
||
Restore(setRestoreParams)
Signature: setRestoreParams:(RestoreParams -> RestoreParams) -> unit
|
Runs the dotnet "restore" command. Parameters
Sample
|
||
RunCommand setCommandParams args
Signature: setCommandParams:(CommandParams -> CommandParams) -> args:string -> unit
|
Runs a dotnet command. Parameters
Sample
|
||
SetVersionInProjectJson version fileName
Signature: version:string -> fileName:string -> unit
|
Sets version in project.json |
||
Test(setTestParams)
Signature: setTestParams:(TestParams -> TestParams) -> unit
|
Runs the dotnet "test" command. Parameters
Sample
|