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

NuGetHelper

Contains helper functions and task which allow to inspect, create and publish NuGet packages. There is also a tutorial about nuget package creating available.

Nested types and modules

TypeDescription
NuGetParams

Nuget parameter type

NuSpecPackage

NuSpec metadata type

NugetDependencies
NugetFrameworkAssemblyReferences
NugetFrameworkDependencies
NugetFrameworkReferences
NugetReferences
NugetSymbolPackage

Functions and values

Function or valueDescription
feedUrl
Signature: string

Default NuGet feed

getDependencies(packagesFile)
Signature: packagesFile:string -> (string * string) list

Returns the dependencies from specified packages.config file

GetMetaDataFromPackageFile(...)
Signature: packageFileName:string -> NuSpecPackage

Returns the NuGet meta data from the given package file name.

Parameters

  • packageFileName - The .nuspec package file name.
getNuspecProperties(nuspec)
Signature: nuspec:string -> NuSpecPackage

Parses nuspec metadata from a nuspec file.

Parameters

  • nuspec - The .nuspec file content.
GetPackageVersion deploymentsDir package
Signature: deploymentsDir:string -> package:string -> string

Gets the version no. for a given package in the deployments folder

NuGet setParams nuspecOrProjectFile
Signature: setParams:(NuGetParams -> NuGetParams) -> nuspecOrProjectFile:string -> unit

Creates a new NuGet package, and optionally publishes it. Template parameter substitution is performed when passing a .nuspec

Parameters

  • setParams - Function used to manipulate the default NuGet parameters.
  • nuspecOrProjectFile - The .nuspec file name.
NuGetDefaults()
Signature: unit -> NuGetParams

NuGet default parameters

NuGetPack setParams nuspecOrProjectFile
Signature: setParams:(NuGetParams -> NuGetParams) -> nuspecOrProjectFile:string -> unit

Creates a new NuGet package based on the given .nuspec or project file. Template parameter substitution is performed when passing a .nuspec

Parameters

  • setParams - Function used to manipulate the default NuGet parameters.
  • nuspecOrProjectFile - The .nuspec or project file name.
NuGetPackDirectly(...)
Signature: setParams:(NuGetParams -> NuGetParams) -> nuspecOrProjectFile:string -> unit

Creates a new NuGet package based on the given .nuspec or project file. The .nuspec / projectfile is passed as-is (no templating is performed)

Parameters

  • setParams - Function used to manipulate the default NuGet parameters.
  • nuspecOrProjectFile - The .nuspec or project file name.
NuGetPublish(setParams)
Signature: setParams:(NuGetParams -> NuGetParams) -> unit

Publishes a NuGet package to the nuget server.

Parameters

  • setParams - Function used to manipulate the default NuGet parameters.
RequireExactly(version)
Signature: version:string -> string

Creates a string which tells NuGet that you require exactly this package version.