Command-line arguments

There are several command-line arguments passed to the utility in order to make it operate, some of which are required, others of which are optional. These are documented below.

Input File

The input file specified by -i or --input is a required argument used to specify the source code file that contains the AssemblyVersion or AssemblyFileVersion attributes.

VersionUpdater.exe -i "C:\MyProject\Properies\AssemblyInfo.cs"

The example above shows how to set the input file. When using the Visual Studio Build Events, there are several macros which can be used to ascertain the project directory and append the path to the AssemblyInfo.* file. See the Visual Studio documentation for more information.

Please note: in order to be updated, the relevant attributes must already exist in the source code file, and cannot use any of the automated versioning features provided by Visual Studio, i.e. the AssemblyVersion attribute cannot contain any asterisk (*) symbols.

Update Type

The update type specified by -u or --update is an optional argument that specifies whether to update one of the AssemblyVersion or AssemblyFileVersion attributes or both of them. The possible values for this argument are shown below.

Value Description Usage
assembly Updates the assembly version. VersionUpdater.exe -u assembly
file Updates the file version. VersionUpdater.exe -u file
both Updates both version attributes. VersionUpdater.exe -u both

Configuration File

The input file specified by -c or --configuration is an optional argument used to specify the source code file that contains the XML Configuration file. If this argument is omitted, the Version Updater will attempt to load a version.config file from the current directory.

VersionUpdater.exe -c "C:\MyProject\Properies\version.config"

Documentation on the format of the configuration file can be found in the Configuration section.

Properties

The properties argument specified by -p or --properties is for the specification of user-defined parameters. These properties are used by some of the version updater classes and are provided in a semi-colon delimited key=value format.

VersionUpdater.exe -p "build=release;platform=x86"

To see which properties an update class requires, please refer to the Configuration section.

Last edited Jan 2, 2013 at 5:29 AM by trwolfe, version 3

Comments

No comments yet.