Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

You are viewing documentation of TeamCity 7.x, which is not the most recently released version of TeamCity. Please refer to the listing to choose another version.

Table of Contents

The predefined properties can originate from several scopes:

  • #Server Build Properties - the properties provided by TeamCity on the server-side in the scope of a particular build. An example of such property is a build number
  • #Agent Properties - properties provided by an agent. The properties are not specific to any build and characterize agent environment (for example, path to .Net framework).
  • #Agent Build Properties - properties provided on the agent side in the scope of a particular build. These properties are passed into a build (for example, path to a file with a list of changed files).

There is also a special kind of server-side build properties that can be used in references while defining other properties, but are not passed into the build. See Reference-only Server Properties below for the listing of such properties.

Server Build Properties

System Property Name

Environment Variable Name




Version of TeamCity server. This property can be used to determine the build is run within TeamCity.



Name of the project the current build belongs to.



Name of the Build Configuration the current build belongs to.


Is set to true if the build is a personal one. Is not defined otherwise.



Build number assigned to the build by TeamCity using the build number format. The property is assigned based on the build number format.


Internal unique id used by TeamCity to reference builds.



Generated username that can be used to download artifacts of other build configurations. Valid only during the build.



Generated password that can be used to download artifacts of other build configurations. Valid only during the build.

build.vcs.number.<simplified VCS root name>

BUILD_VCS_NUMBER_<simplified VCS root name>

Latest VCS revision included in the build for the root identified. See below for the <simplified VCS root name> description. If there is only a single root in the configuration, build.vcs.number property (without the root name) is also provided.


Please note that this value is a VCS-specific (for example, for SVN the value is a revision number while for CVS it is a timestamp)

In versions of TeamCity prior to 4.0, different format for VCS revision number when specified in build number pattern was used: {build.vcs.number.N} where N is VCS root order number in the build configuration. If you still need this to work, you can launch TeamCity with special internal option:

<simplified VCS root name> is the VCS root name with all non-alphanumeric characters replaced with _ symbol. Please ensure your VCS roots names differ sufficiently and are not mapped into the same simplified name (in this case the value of the property can get any).

Reference-only Server Properties

  The license could not be verified: License Certificate has expired!

These are the properties that other properties can reference (only if defined on Build Parameters page), but that are not passed to the build themselves.

You can get the full set of reference-only server properties by adding system.teamcity.debug.dump.parameters property to the build configuration and examining "Available reference-only server properties" section in the build log.

The following sets of such properties exist:

Dependencies Properties

Properties provided by the builds the current build depends on (via snapshot or artifact dependency).

Dependencies properties have the following format:

  • <btID> — is the internal ID of the build configuration to get the property from. Only the configurations the current one has snapshot or artifact dependencies on are supported. Indirect dependencies configurations are also available (e.g. A depends on B and B depends on C - A will have C's properties available).
  • <property name> — the name of the server build property of the build configuration with the given ID.

VCS Properties

These are the settings of a VCS roots attached to the build configuration.

VCS properties have the following format:

  • <simplified VCS root name> — is the VCS root name as described above.
  • <VCS root property name> — the name of the VCS root property. This is VCS-specific and depends on the VCS support. You can get the available list of properties as described above.

If there is only one VCS root in a build configuration, <simplified VCS root name>. part can be omitted.

Properties marked by VCS support as secure (for example, passwords) are not available as reference properties.

Branch Properties

For Git & Mercurial TeamCity provides additional parameters with names of VCS branches known at the moment of build starting. If a build took a revision from the refs/heads/bugfix branch, TeamCity will add a configuration parameter with the following name:

Agent Properties

Agent-specific properties are defined on each build agent and vary depending on its environment. Aside from standard properties (for example, or os.arch, etc. — these are provided by JVM running on agent) agents also have properties based on installed applications. TeamCity automatically detects a number of applications including the presence of .NET Framework, Visual Studio and adds the corresponding system properties and environment variables. A complete list of predefined agent-specific properties is provided in the table below.

If additional applications/libraries are available in the environment, the administrator can manually define the property in the <agent home>/conf/ file. These properties can be used for setting various build configuration options, for defining build configuration requirements (for example, existence or lack of some property) and inside build scripts. For more information on how to reference these properties see Defining and Using Build Parameters in Build Configuration page.

The actual properties defined on agent can be reviewed on the Agent Details page.

Predefined Property


Name of the agent as specified in the agent configuration file. Can be used to set a requirement of build configuration to run (or not run) on particular build agent.

Path of Agent Work Directory.


Path of Agent Home Directory.

corresponding JVM property (see JDK help for properties description)


corresponding JVM property


corresponding JVM property

corresponding JVM property


corresponding JVM property


corresponding JVM property

corresponding JVM property


corresponding JVM property


corresponding JVM property


corresponding JVM property


corresponding JVM property


corresponding JVM property


This property is defined if the corresponding version(s) of .NET Framework is installed. (Supported versions are 1.1, 2.0, 3.5, 4.0)


This property's value is set to the corresponding framework version(s) path(s)


This property is defined if the corresponding version(s) of .NET Framework SDK is installed. (Supported versions are 1.1, 2.0)


This property's value is the path of the corresponding framework SDK version.


This property is defined if the corresponding version of Windows SDK is installed. (Supported versions are 6.0, 6.0A, 7.0, 7.0A, 7.1)


This property is defined if the corresponding version(s) of Visual Studio is installed


This property's value is the path to the directory that contains devenv.exe


This property value is the path to the directory that contains the standalone NUnit test launcher, NUnitLauncher.exe. The version number refers to the version of .NET Framework under which the test will run. The version equals the version of .NET Framework and can have a value of 1.1, 2.0, or 2.0vsts.


The property value is the path to the directory that contains the MSBuild task dll providing the NUnit task for MSBuild, Visual Studio (sln).

  • Make sure to replace "." with "_" when using properties in MSBuild scripts. That is use teamcity_dotnet_nunitlauncher_msbuild_task instead of teamcity.dotnet.nunitlauncher.msbuild.task
  • _x86 and _x64 property suffixes are used to designate the specific version of the framework.
  • teamcity.dotnet.nunitlauncher properties can not be hidden or disabled.

Agent Build Properties

These properties are unique for each build: they are calculated on the agent right before build start and are then passed to the build.

System Property Name

Environment Variable Name



Checkout directory used for the build.


Working directory where the build is started. This is a path where TeamCity build runner is supposed to start a process. This is a runner-specific property, thus it has different value for each new step.


Full path of the build temp directory automatically generated by TeamCity. The directory will be cleaned after the build.


Full name (including path) of the file containing all the system.* properties passed to the build. "system." prefix stripped off. The file uses Java properties file format (for example, special symbols are backslash-escaped).


Full path to a file with information about changed files included in the build. This property is useful if you want to support running of new and modified tests in your tests runner. This file is only available if there were changes in the build.