Posts

Showing posts from July, 2017

Create a draft release and start it using the TFS REST API

The code below uses the preview API to retrieve a release definition, create a new draft release from the latest build, update some variables, then activate the release and start the deployment on a specific environment.
It serves as a reference regarding how to use the RM API.

I used the following nuget packages:
<packages>
  <package id="Microsoft.AspNet.WebApi.Client" targetframework="net452" version="5.2.3"/>
  <package id="Microsoft.AspNet.WebApi.Core" targetframework="net452" version="5.2.3"/>
  <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" targetframework="net452" version="3.14.1"/>
  <package id="Microsoft.TeamFoundation.DistributedTask.Common.Contracts" targetframework="net452" version="15.118.0-preview"/>
  <package id="Microsoft.TeamFoundationServer.Client" targetframework="net452" versio…