title: VSTS Release Management with an Azure Cloud Services project and environment variables
body: <p>Currently, I have a build definition that publishes as its artifact, an azure cloud services package. This is then deployed via release management. In my release pipeline, I then promote this package through various environments. What I don't understand is how to perform web.config transformations on deploy to an environment, as that happens during the build, and not during the deploy.</p>
  
  <p>I can tokenize my web.config during the build, and then use a release task to replace those with the proper values per environment. If I were just publishing a website as my build artifact, then this would work just fine, but since my build artifact is an azure cspkg, then I don't have access to the config files.</p>
  
  <p>Is there a way to have the release process create the azure cloud services package, instead of the build? This way I can do the token replacement before creating the package. I would like to stay away from having the release do a rebuild for every environment if possible. Ultimately, I'd like for a single artifact from the build to be promoted to each environment, only having it's configuration files changed along the way.</p>
  
  <p>I've looked into maybe using CSPack? Right now the packages are built by a cloud services project (ccproj) using the visual studio build task with the '/t:Publish' option. If I were to use CSPack in the release process, what should the build artifact be, and would that mean not using the cloud services project at all?</p>