title: How to access an artifact's BUILDNUMBER is Visual Studio Team Services Release management
body: <p>I need to access the build number of the artifact within Visual Studio Team Services Release Management, so that I can send the value to a Task.</p>
  
  <p>My artifact name has a space in it: "Production Branch"</p>
  
  <p>I have been reading the following documentation.</p>
  
  <p><a href="https://www.visualstudio.com/en-us/docs/release/author-release-definition/understanding-artifacts#variables" rel="nofollow noreferrer">https://www.visualstudio.com/en-us/docs/release/author-release-definition/understanding-artifacts#variables</a></p>
  
  <p>The documentation states that it can be accessed like this:</p>
  
  <p><strong>RELEASE_ARTIFACTS_[source-alias]_[variable-name]</strong></p>
  
  <p>e.g.</p>
  
  <p><strong>RELEASE_ARTIFACTS_Production Branch_BUILDNUMBER</strong></p>
  
  <p>It goes on to say that if being used to pass an Argument to a task, replace the underscore with a period so:</p>
  
  <p><strong>RELEASE.ARTIFACTS.Production Branch.BUILDNUMBER</strong></p>
  
  <p>However this results in the following error:</p>
  
  <p>2017-02-02T12:15:49.6988066Z ##[error]The term 'Release.Artifacts.Production_Branch.BUILDNUMBER' 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.</p>
  
  <p>This could be due to the artifact name containing a space character and I am unsure of how to handle this.</p>