Skip to content

Command Arguments

Ryan Christiansen edited this page May 16, 2017 · 9 revisions

Available commands are listed below.

Command Description Required
-debug Displays detailed errors and stack trace information.
-help or ? Displays help information and examples.
-metadata Overrides generated NuSpec metadata properties.
-module The module code name.
-nuspec The NuSpec file path (absolute or relative to the website root).
-output Specifies the package output directory (absolute or relative
to the website root). The default path is 'CMSSiteUtils/Export'.
-properties Defines a set of property tokens where each occurrence of
$token$ in the specified NuSpec file will be replaced
with the given value.
-version Sets the package version explicitly or resolves the
version by assembly attribute.

-debug

Displays detailed errors and stack trace information.

Usage

PackageBuilder.exe -module:<codename> -debug

where <codename> represents the Kentico module code name.

-help

Displays help information and examples.

Usage

PackageBuilder.exe -help

PackageBuilder.exe ?

Note: The -? and \? aliases are also accepted help aliases.

-metadata

Overrides generated NuSpec metadata properties.

Usage

PackageBuilder.exe -module:<codename> -metadata:<object>

where <codename> represents the Kentico module code name and <object> represents a comma-delimited list of metadata names and values.

Options

Property Description
id The case-insensitive package identifier.
title The human-friendly title of the package for UI display.
description The package long description for UI display.
authors A comma-separated list of package authors.

Examples

PackageBuilder.exe -module:Acme.Module -metadata:title="Acme Management Module"

PackageBuilder.exe -module:Acme.Module -metadata:id=Acme.Kentico.Module,title="Acme Management Module"

Note: Single quotes ' or double quotes " are required to declare values with spaces.

-module

The module code name. This is a required command argument.

Usage

PackageBuilder.exe -module:<codename>

where <codename> represents the Kentico module code name.

Examples

PackageBuilder.exe -module:Acme.Module

-nuspec

The NuSpec (.nuspec) package specification file path (absolute or relative to the website root).

For more detailed information see the NuSpec Manifests section.

Usage

PackageBuilder.exe -module:<codename> -nuspec:<nuspecfile>

where <codename> represents the Kentico module code name and <nuspecfile> represents a NuSpec (.nuspec) package specification file path.

Note: Using the command -nuspec without a value or -nuspec=* will automatically detect .nuspec files matching the module code name (<codename>.nuspec) from the website root directory. As with other commands, file paths with spaces will require single quotes ' or double quotes ".

-output

Specifies the package output directory (absolute or relative to the website root). The default path is 'CMSSiteUtils/Export'.

Usage

PackageBuilder.exe -module:<codename> -output:<path>

where <codename> represents the Kentico module code name and <path> the package output directory.

Examples

PackageBuilder.exe -module:Acme.Module -output:Packages\Modules

PackageBuilder.exe -module:Acme.Module -output:"Packages\Custom Modules"

PackageBuilder.exe -module:Acme.Module -output:"D:\Packages\Custom Modules"

Note: Single quotes ' or double quotes " are required to declare paths with spaces.

-properties

Defines a set of property tokens where each occurrence of $token$ in the specified NuSpec (.nuspec) file will be replaced with the given value.

For more detailed information see the NuSpec Manifests section.

Usage

PackageBuilder.exe -module:<codename> -nuspec:<nuspecfile> -properties:<object>

where <codename> represents the Kentico module code name, <nuspecfile> represents a NuSpec (.nuspec) package specification file path, and <object> represents a comma-delimited list of token names and values.

-version

Sets the package version explicitly or resolves the version by assembly attribute.

For more detailed information see the Package Versioning section.

Usage

PackageBuilder.exe -module:<codename> -version:<object>

where <codename> represents the Kentico module code name and <object> represents either a manual version or assembly version reference described in the following examples.

Examples

Manual Versionioning

PackageBuilder.exe -module:Acme.Module -version:1.0.0-CI20170510

PackageBuilder.exe -module:Acme.Module -version:1.0.0-CI%build.number%

Versioning by Assembly Attribute

PackageBuilder.exe -module:Acme.Module -version:assembly

PackageBuilder.exe -module:Acme.Module -version:assembly,assemblyAttribute=AssemblyInformationalVersion

PackageBuilder.exe -module:Acme.Module -version:assembly=CustomLibrary.dll

PackageBuilder.exe -module:Acme.Module -version:assembly=CustomLibrary.dll,assemblyAttribute=AssemblyInformationalVersion

PackageBuilder.exe -module:Acme.Module -version:assembly="D:\Custom Modules\CustomLibrary.dll"

Note: Using the argument property assembly or assembly=* will automatically detect assembly files matching the module code name (<codename>.dll or <codename>.exe) from the website root or bin directories. If no assemblyAttribute property is specified, the AssemblyFileVersion attribute will be used by default.

The following assembly attributes are currently supported:

Attribute Type Description
AssemblyVersion The assembly identity version
AssemblyFileVersion (default) The assembly file version
AssemblyInformationalVersion (recommended) The assembly version information