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

NuGet

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
BreakingPoint
NuGetDependency
NuGetParams

Nuget parameter type

NuGetPushParams

dotnet nuget push command options

NuSpecPackage

NuSpec metadata type

NugetDependencies
NugetFrameworkAssemblyReferences
NugetFrameworkDependencies
NugetFrameworkReferences
NugetReferences
NugetSymbolPackage
WebClient

Functions and values

Function or valueDescription
galleryV1
Signature: string
Attributes:
[<Obsolete("This V1 NuGet feed url most likely doesn't work. Please consider using v3 nuget feed via `NuGet.galleryV3`.")>]
OBSOLETE

This V1 NuGet feed url most likely doesn't work. Please consider using v3 nuget feed via `NuGet.galleryV3`.

Default NuGet feed

galleryV2
Signature: string
galleryV3
Signature: string
getDependencies(packagesFile)
Signature: packagesFile:string -> NuGetDependency list

Returns the dependencies from specified packages.config file

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.

RequireRange breakingPoint version
Signature: breakingPoint:BreakingPoint -> version:string -> string

Type extensions

Type extensionDescription
x.UploadFileAsMultipart url filename
Signature: url:Uri -> filename:string -> unit