title: Getting the TeamCity build number into the AssemblyInfo file using Nant
body: <p>I have done a lot of googling but cant seem to find an exact solution to get the TeamCity build number into my AssemblyInfo files. Would appreciate a full solution for my requirements...</p>
  
  <p>1 Get the build number into a Nant variable. I believe that this code will accomplish this..</p>
  
  <pre><code>   PropertyGroup
  
        Version$(BUILD_NUMBER)/Version
  
  /PropertyGroup 
  </code></pre>
  
  <p>(repoduced as best as possible in SO).</p>
  
  <p>2 Now I need a way to update the <em>revision</em> component of my version numbers so I get something like 1.0.0.[build number].</p>
  
  <p>3 Ideally I need the whole thing in a re-usable Nant target so that I can just call it passing in the path to the assembly info file that i want to update.</p>
  
  <p>I would respectfully request that if you can help me that a full solution is posted here with explanation as opposed to links to other sites. Ive looked at a lot of online examples but cant seem to find one that fits what I need - therefore I request the knowledge of the omnipotent SO community!</p>
  
  <p>Thanks in advance.</p>