Build Number format

I have a line in my ANT build script like this:

]]>##teamcity(buildNumber '$')</echo>

This has the effect of passing my internal version number to TeamCity, which is fine.

However I now wish to include this number in a notification email, so I have a line in the body of my email spec like this:

The deployments are labelled ""

The result correctly shows my internal version number, but preceded with a # character; for example if my property Version is set to, the resultant email says

The deployments are labelled "#"

How can I suppress the leading # character?

Edited by: Ken Turner on Aug 7, 2008 3:02 PM

Edited by: Ken Turner on Aug 7, 2008 3:06 PM


Hello Ken,

I'm afraid, there is no simple way to do it. Unfortunately, TC adds # to build number itself.
In the next version of TeamCity we'll fix this problem.

As a workaround, you can create a simple plugin to process some other pattern, like MY_BUILD_NUMBER and include
build number without # part.
Some details on how to write such a plugin are available at

General information on plugin writing can be found at:

Kind regards,


OK, thanks for your response. It prompts another question:

In the body of the notification email I can refer to such predefined properties such as , , etc. Is there any way I can inject system or environment properties into the email, without going to the lengths of writing a plugin?

Edited by: Ken Turner on Aug 8, 2008 6:04 PM


Hello Ken,

Unfortunately, it is not possible by the moment. But this is really good idea!

I've created an issue in our tracker, please vote/watch it:

Kind regards,


Please sign in to leave a comment.