Build your Azure cloud service


VSTS | TFS 2018 | TFS 2017 | TFS 2015

Here we’ll show you how to define your continuous integration (CI) process for your Azure cloud service project.

Get set up

For the instructions in this topic, you need an Azure cloud service project in Visual Studio.


If you don’t yet have an app but want to try this out, then see the Q&A below.

Define your CI build process

Create the build definition

  1. Open your team project in your web browser ▼

  2. Create a build definition (Build and Release tab > Builds) ▼

    Build tab
  3. Select the Azure Cloud Service template.
  4. As the repository source, select the team project, repository, and branch.
  5. Remove the Azure Cloud Service Deployment task from the build definition, since you will be deploying the cloud service later through a release definition.

Enable continuous integration (CI)

On the Triggers tab, enable continuous integration (CI). This tells the system to queue a build whenever someone on your team commits or checks in new code.

Queue and test the build

Save the build definition and queue a new build by selecting the Queue new build command. Once the build is done, click Artifacts and then Explore to see the cloud service package (.cspkg file) produced by the build. This is the package that your release definition will consume to deploy your app.

Deploy your app

After you’ve run the build, you’re ready to create a release definition to deploy your app to:


How do I create an Azure cloud service solution?

  1. In Visual Studio, connect to your team project.

  2. On the Team Explorer home page (Keyboard: Ctrl + 0, H), under Solutions, click New.

  3. Select the Cloud templates section, and then choose the Azure Cloud Service template.

  4. When prompted for the roles in the cloud service, choose the ASP.NET Web role to the project.

  5. When prompted for the type of ASP.NET project for the Web role, choose the MVC project.

  6. Commit and push (Git) or check in (TFVC) your code.