Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As someone mentioned, you can output the build number during the execution of the build script, and teamcity will use that output to label the build. For example, I label my build with the same version that I put into AssemblyInfo.cs. Part of that version (Major, Minor) is actually in the file already, the other part (Build, Revision) gets added during the build.</p> <p>From my msbuild script:</p> <pre><code>&lt;Target Name="Setup"&gt; &lt;!-- Version.txt contains the major and minor version numbers, The build number and revision come from environment variables in the next step --&gt; &lt;Version VersionFile="Version.txt" BuildType="None" RevisionType="None"&gt; &lt;Output TaskParameter="Major" PropertyName="Major" /&gt; &lt;Output TaskParameter="Minor" PropertyName="Minor" /&gt; &lt;/Version&gt; &lt;!-- If you want to build a release without going through the build server, you should define the following 2 environment variables when running this build script --&gt; &lt;!-- BUILD_NUMBER environment variable supplied by the build server --&gt; &lt;CreateProperty Value="$(BUILD_NUMBER)"&gt; &lt;Output TaskParameter="Value" PropertyName="Build" /&gt; &lt;/CreateProperty&gt; &lt;!-- BUILD_VCS_NUMBER environment variable supplied by the build server --&gt; &lt;CreateProperty Value="$(BUILD_VCS_NUMBER)"&gt; &lt;Output TaskParameter="Value" PropertyName="Revision" /&gt; &lt;/CreateProperty&gt; &lt;AssemblyInfo CodeLanguage="CS" OutputFile="Properties\VersionInfo.cs" AssemblyVersion="$(Major).$(Minor).$(Build).$(Revision)" AssemblyFileVersion="$(Major).$(Minor).$(Build).$(Revision)" /&gt; &lt;!-- Tell the build server what our actual build number is --&gt; &lt;Message Text="##teamcity[buildNumber '$(Major).$(Minor).$(Build).$(Revision)']" /&gt; &lt;/Target&gt; </code></pre> <p>you just output the version during the build the format is <code>##teamcity[buildNumber '&lt;buildnum&gt;']</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload