title: How to use $(Rev:r) in VSTS build definition?
body: <p>I have requirement that my build is generating abc.msi file through Private build agent.Now I have added the Powershell task to rename the abc.msi with abc_3.0.0$(Rev:r).msi but The Powershell task is failing.Please help me out how to achieve this.I would like to have the build name format like abc_3.0.0.1 ,abc_3.0.0.2,abc_3.0.0.3 ...and so on.It should keep increase the value of $(Rev:r) as the builds are getting increased.</p>
  
  <p>The Powershell command which I am running is:</p>
  
  <pre><code>Rename-Item -Path "C:\Softwares\vsts-agent-win-x86-2.147.1\_work\1\s\src\abcSetup\Release\abc.msi" -NewName "C:\Softwares\vsts-agent-win-x86-2.147.1\_work\1\s\src\abcSetup\Release\abc_3.0.0.$(Rev:r).msi"
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>Rev:r : The term 'Rev:r' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check  the spelling of the
    name, or if a path was included, verify that the path is correct and
    try again. At
    C:\Softwares\vsts-agent-win-x86-2.147.1_work_temp\fef4cc6a-e677-4a08-ab29-73c7c31da755.ps1:2
    char:243
    + ... ork\1\s\src\abcSetup\Release\abc_3.0.0.$(Rev:r).msi"
    +                                                               ~~~~~
        + CategoryInfo          : ObjectNotFound: (Rev:r:String) [], ParentContainsErrorRecordException
        + FullyQualifiedErrorId : CommandNotFoundException  </p>
    
    <p>[error]PowerShell exited with code '1'.</p>
    
    <p>[section]Finishing: Renaming the .MSI File</p>
  </blockquote>