This is part of the Fake.DotNet.NuGet module.

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
NugetPackageInfo
NugetReferences
NugetSymbolPackage
WebClient

Functions and values

Function or valueDescription
galleryV3
Signature: string

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

Parameters

  • packageFileName - The .nuspec package file name. Default NuGet feed
getDependencies(packagesFile)
Signature: packagesFile:string -> NuGetDependency list

Returns the dependencies from specified packages.config file

getLatestPackage repoUrl packageName
Signature: repoUrl:string -> packageName:string -> NugetPackageInfo

Gets the latest published package from NuGet feed by package id.

Parameters

  • repoUrl - Query endpoint of NuGet search service
  • packageName - The package to get
getNuspecProperties(nuspec)
Signature: nuspec:string -> NuSpecPackage

Parses nuspec metadata from a nuspec file.

Parameters

  • nuspec - The .nuspec file content.
getPackage repoUrl packageName version
Signature: repoUrl:string -> packageName:string -> version:string -> NugetPackageInfo

Gets a Package information from NuGet feed by package id.

Parameters

  • repoUrl - Query endpoint of NuGet search service
  • packageName - The package to get
  • version - The specific version to get
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
searchByTitle repoUrl packageName
Signature: repoUrl:string -> packageName:string -> NugetPackageInfo list

Search NuGet query endpoint for packages macthing given name by title

Parameters

  • repoUrl - Query endpoint of NuGet search service
  • packageName - The package to search for

Type extensions

Type extensionDescription
x.DownloadData(uri)
Signature: uri:string -> byte []
x.DownloadData(uri)
Signature: uri:Uri -> byte []
x.DownloadDataTaskAsync(uri)
Signature: uri:Uri -> Task<byte []>
x.DownloadDataTaskAsync(uri)
Signature: uri:string -> Task<byte []>
x.DownloadFile(uri, filePath)
Signature: (uri:string * filePath:string) -> unit
x.DownloadFile(uri, filePath)
Signature: (uri:Uri * filePath:string) -> unit
x.DownloadFileTaskAsync(uri, filePath)
Signature: (uri:Uri * filePath:string) -> Task<unit>
x.DownloadFileTaskAsync(uri, filePath)
Signature: (uri:string * filePath:string) -> Task<unit>
x.DownloadString(uri)
Signature: uri:string -> string
x.DownloadString(uri)
Signature: uri:Uri -> string
x.DownloadStringTaskAsync(uri)
Signature: uri:Uri -> Task<string>
x.DownloadStringTaskAsync(uri)
Signature: uri:string -> Task<string>
x.UploadFileAsMultipart url filename
Signature: url:Uri -> filename:string -> HttpResponseMessage