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

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

v5.fake.build

Restore Module

Contains tasks which allow to restore NuGet packages from a NuGet package feed like nuget.org using the nuget.exe restore command. There is also a tutorial about nuget package restore available.

Types

Type Description

NugetRestoreVerbosity

RestorePackages Verbosity settings

RestorePackageParams

RestorePackages parameter path

RestoreSinglePackageParams

RestorePackages parameter path for single packages

Functions and values

Function or value Description

RestoreMSSolutionPackages setParams solutionFile

Full Usage: RestoreMSSolutionPackages setParams solutionFile

Parameters:

Restores the packages in the given solution file file from NuGet.

setParams : RestorePackageParams -> RestorePackageParams

Function used to manipulate the default NuGet parameters.

solutionFile : string

The microsoft sln file name.

Example


 Target "RestorePackages" (fun _ ->
          "./src/Everything.sln"
          |> RestoreMSSolutionPackages (fun p ->
              { p with
                  Sources = "http://myNugetSources.com" :: p.Sources
                  OutputPath = outputDir
                  Retries = 4 })
      )

RestorePackage setParams packageFile

Full Usage: RestorePackage setParams packageFile

Parameters:

Restores the packages in the given packages.config file from NuGet.

setParams : RestorePackageParams -> RestorePackageParams

Function used to manipulate the default NuGet parameters.

packageFile : string

The packages.config file name.

Example


 Target "RestorePackages" (fun _ ->
          "./src/ProjectA/packages.config"
          |> RestorePackage (fun p ->
              { p with
                  Sources = "http://myNugetSources.com" :: p.Sources
                  OutputPath = outputDir
                  Retries = 4 })
      )

RestorePackageDefaults

Full Usage: RestorePackageDefaults

Returns: RestorePackageParams

RestorePackage defaults parameters

Returns: RestorePackageParams

RestorePackageId setParams packageId

Full Usage: RestorePackageId setParams packageId

Parameters:

Restores the given package from NuGet

setParams : RestoreSinglePackageParams -> RestoreSinglePackageParams

Function used to manipulate the default NuGet parameters.

packageId : string

RestorePackages ()

Full Usage: RestorePackages ()

Parameters:
    () : unit

Restores all packages from NuGet to the default directories by scanning for packages.config files in any subdirectory.

() : unit

RestoreSinglePackageDefaults

Full Usage: RestoreSinglePackageDefaults

Returns: RestoreSinglePackageParams

RestoreSinglePackageParams defaults parameters

Returns: RestoreSinglePackageParams

findNuget defaultPath

Full Usage: findNuget defaultPath

Parameters:
    defaultPath : string - The default path to return when NuGet cannot be found by path specified above

Returns: string

Looks for NuGet.exe in

  • the specified defaultPath
  • a list of standard tool folders
  • any subfolder in the current directory
  • the PATH - returns the first path where NuGet.exe was found.

defaultPath : string

The default path to return when NuGet cannot be found by path specified above

Returns: string