Configuration

This section details the structure of the XML configuration file along with the available version updater classes.

The Configuration File

Version numbers in .NET assemblies are of the format major.minor.build.revision and the configuration file is structured to reflect that, with each section representing a different component of the version number. Each component must be a non-negative integer up to a maximum of 65,535.

<version>
  <major />
  <minor />
  <build />
  <revision />
</version>

Each version component element also has a mode attribute that can be set to control how the sub-components are combined. By default, the version component modes are set to concat. This is explained in detail in the Branch Updater Classes section.

Updater Classes

Each version component element also has a mode attribute that can be set to control how the sub-components are combined. By default, the version component modes are set to concat. This is explained in detail in the Branch Updater Classes section.

Leaf Updater Classes

Leaf updater classes cannot contain child updater classes. These types of updater classes usually operate specifically on a fixed value or a value from a property.

Here are the currently supported leaf updater classes:

Branch Updater Classes

Branch updater classes can contain child updater classes, and the value that they operate on is discerned by calculating the value represented by the child elements. These types of updater classes have a special mode attribute that can be used to control how the combination of the child elements is calculated. The default value for this attribute differs by updater class.

Mode Description
concat The values will be concatenated as text.
sum The values will be summed as integers.

Here are the currently supported branch updater classes:

Component Evaluation

Version number components are calculated in the following order: major, minor, build, revision. Each updater class will recursively return a value to its parent updater class until the final value is propagated to the root updater class. This value will then be returned to the version component.

Where possible, the version number is treated as text to allow for concatenation and substring operations. In the event that a numeric value is required, for example in the sum updater class, this value will be converted to an integer. In the event that the textual value is unable to be cast as a numeric data-type, a value of zero will take its place.

Last edited Jan 3, 2013 at 7:55 AM by trwolfe, version 5

Comments

No comments yet.