ChocolateyPack(ICakeContext, IEnumerable<FilePath>, ChocolateyPackSettings) Method


Creates Chocolatey packages using the specified Nuspec files.


public static void ChocolateyPack(this ICakeContext context, IEnumerable<FilePath> filePaths, ChocolateyPackSettings settings)


     var chocolateyPackSettings   = new ChocolateyPackSettings {
                                     Id                      = "TestChocolatey",
                                     Title                   = "The tile of the package",
                                     Version                 = "",
                                     Authors                 = new[] {"John Doe"},
                                     Owners                  = new[] {"Contoso"},
                                     Summary                 = "Excellent summary of what the package does",
                                     Description             = "The description of the package",
                                     ProjectUrl              = new Uri(""),
                                     PackageSourceUrl        = new Uri(""),
                                     ProjectSourceUrl        = new Uri(""),
                                     DocsUrl                 = new Uri(""),
                                     MailingListUrl          = new Uri(""),
                                     BugTrackerUrl           = new Uri(""),
                                     Tags                    = new [] {"Cake", "Script", "Build"},
                                     Copyright               = "Some company 2015",
                                     LicenseUrl              = new Uri(""),
                                     RequireLicenseAcceptance= false,
                                     IconUrl                 = new Uri(""),
                                     ReleaseNotes            = new [] {"Bug fixes", "Issue fixes", "Typos"},
                                     Files                   = new [] {
                                                                          new ChocolateyNuSpecContent {Source = "bin/TestChocolatey.dll", Target = "bin"},
                                     Debug                   = false,
                                     Verbose                 = false,
                                     Force                   = false,
                                     Noop                    = false,
                                     LimitOutput             = false,
                                     ExecutionTimeout        = 13,
                                     CacheLocation           = @"C:\temp",
                                     AllowUnofficial          = false

     var nuspecFiles = GetFiles("./**/*.nuspec");
     ChocolateyPack(nuspecFiles, chocolateyPackSettings);


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.


Name Type Description
context ICakeContext The context.
filePaths IEnumerable<FilePath> The nuspec file paths.
settings ChocolateyPackSettings The settings.

Return Value

Type Description