MSBuild Service Tasks
For MSBuild, TeamCity provides the following service tasks that implement the same options as the Build Script Interaction:
TeamCitySetBuildNumber
TeamCitySetBuildNumber allows user to change BuildNumber:
It is possible to use {build.number} as a placeholder for older build number.
TeamCityProgressMessage
TeamCityProgressMessage allows you to write progress message.
TeamCityPublishArtifacts
TeamCityPublishArtifacts allows you to publish all artifacts taken from MSBuild item group
TeamCityReportStatsValue
TeamCityReportStatsValue is a handy task to publish statistic values
TeamCityBuildProblem
TeamCityBuildProblem task reports a build problem which actually fails the build. Build problems appear on the build results page and also affect build status text.
Mandatory
descriptionattribute is a human-readable text describing the build problem. By defaultdescriptionappears in build status text.
identityis an optional attribute and characterizes particular build problem instance. Shouldn't change throughout builds if the same problem occurs, e.g. the same compilation error. Should be a valid Java id up to 60 characters. By defaultidentityis calculated based ondescription.
TeamCitySetStatus
TeamCitySetStatus is a task to change current build status text.
Prior to TeamCity 8.0, this task was also used for changing build status to failure. However since TeamCity 7.1 TeamCityBuildProblem task should be used for this purpose.
{build.status.text is substituted with older status text.
Status can have SUCCESS value.