Build C++ Windows apps

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019 | TFS 2018


In Microsoft Team Foundation Server (TFS) 2018 and previous versions, build and release pipelines are called definitions, runs are called builds, service connections are called service endpoints, stages are called environments, and jobs are called phases.

This article explains how to build C++ projects on Windows automatically.


This example shows how to build a C++ project. To start, import (into Azure Repos or TFS) or fork (into GitHub) this repo:


This scenario works on TFS, but some of the following instructions might not exactly match the version of TFS that you are using. You'll need to set up a self-hosted agent, possibly also installing software. If you are a new user, you might have a better learning experience by trying this procedure out first using a free Azure DevOps organization. Then change the selector in the upper-left corner of this page from Team Foundation Server to Azure DevOps.

  • After you have the sample code in your own repository, create a pipeline using the instructions in Create your first pipeline and select the .NET Desktop template. This automatically adds the tasks required to build the code in the sample repository.

  • Save the pipeline and queue a build to see it in action.

Build multiple configurations

It's often required to build your app in multiple configurations. The following steps extend the example above to build the app on four configurations: [Debug, x86], [Debug, x64], [Release, x86], [Release, x64].

  1. Select the Variables tab and modify these variables:

    • BuildConfiguration = debug, release

    • BuildPlatform = x86, x64

  2. Select Tasks and click on the agent job. From the Execution plan section, select Multi-configuration to change the options for the job:

    • Specify Multipliers: BuildConfiguration, BuildPlatform

    • Specify Maximum number of agents

  3. Select Parallel if you have multiple build agents and want to build your configuration/platform pairings in parallel.

Copy output

To copy the results of the build to Azure Pipelines select the Copy Files task. Specify the following arguments:

   contents: '**\$(BuildConfiguration)\**\?(*.exe|*.dll|*.pdb)'