Summary
Creates NuGet packages using the specified nuspec or project files.
Syntax
[CakeMethodAlias]
[CakeAliasCategory("Pack")]
[CakeNamespaceImport("Cake.Common.Tools.NuGet.Pack")]
public static void NuGetPack(this ICakeContext context, IEnumerable<FilePath> filePaths, NuGetPackSettings settings)
Examples
var nuGetPackSettings = new NuGetPackSettings {
Id = "TestNuGet",
Version = "0.0.0.1",
Title = "The tile of the package",
Authors = new[] {"John Doe"},
Owners = new[] {"Contoso"},
Description = "The description of the package",
Summary = "Excellent summary of what the package does",
ProjectUrl = new Uri("https://github.com/SomeUser/TestNuGet/"),
IconUrl = new Uri("http://cdn.rawgit.com/SomeUser/TestNuGet/master/icons/testNuGet.png"),
LicenseUrl = new Uri("https://github.com/SomeUser/TestNuGet/blob/master/LICENSE.md"),
Copyright = "Some company 2015",
ReleaseNotes = new [] {"Bug fixes", "Issue fixes", "Typos"},
Tags = new [] {"Cake", "Script", "Build"},
RequireLicenseAcceptance= false,
Symbols = false,
NoPackageAnalysis = true,
Files = new [] {
new NuSpecContent {Source = "bin/TestNuGet.dll", Target = "bin"},
},
BasePath = "./src/TestNuGet/bin/release",
OutputDirectory = "./NuGet"
};
var nuspecFiles = GetFiles("./**/*.nuspec");
NuGetPack(nuspecFiles, nuGetPackSettings);
Attributes
Type |
Description |
CakeMethodAliasAttribute |
An attribute used to mark script method aliases.
|
CakeAliasCategoryAttribute |
An attribute used for documentation of alias methods/properties.
|
CakeNamespaceImportAttribute |
An attribute used to hint Cake about additional namespaces that need
to be imported for an alias to work. This attribute can mark an
extension method, the extension method class, or the assembly to provide a global set of imports.
|
Parameters
Return Value