title: TeamCity build.counter parameter in build.xml
body: <p>It seems that the TeamCity parameter ${build.counter} is not resolving in our ant build.xml.  We have:</p>
  
  <pre><code>&lt;replaceregexp 
          file="AndroidManifest.xml"
          match='android:versionCode="(.*)"'
          replace='android:versionCode="${build.counter}"'
  /&gt;
  </code></pre>
  
  <p>This throws the error:</p>
  
  <blockquote>
    <p>String types not allowed (at 'versionCode' with value '${build.counter}')</p>
  </blockquote>
  
  <p>It looks like it is taking the parameter "${build.counter}" as a literal string.</p>
  
  <p>Using another TeamCity integer parameter in place of ${build.counter}, for example ${teamcity.build.id}, works fine.</p>
  
  <p>Does anyone know why this might be?</p>
  
  <p><strong>Update</strong></p>
  
  <p>Thanks Biswajit_86 for the answer.  Here also is my <a href="http://youtrack.jetbrains.com/issue/TW-37125" rel="nofollow">related discussion with JetBrains</a>:</p>