How to build a solution with multiple build configuration (debug, release) in Azure DevOps build definiton

4k Views Asked by At

Is something like this possible, to build the solution with two configurations at the same time?

?

enter image description here

3

There are 3 best solutions below

1
Toruk Makto On BEST ANSWER

The Multiplier varaibale has to be supplied without the $ and parenthesis ()

"Under the agent job of the assigned task, on the Parallelism tab, select Multi-configuration and specify the Multipliers separated by commas. For example: BuildConfiguration, BuildPlatform"

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/build/visual-studio-build?view=azure-devops#how-do-i-build-multiple-configurations-for-multiple-platforms

5
Shayki Abramczyk On

Yes, you need go to the Agent Job options -> Parallelism -> Multi-configuration:

enter image description here

In the build task you put the same variable in the build configuration.

Now the build will be executed twice, one with release configuration and one with debug.

0
Hari Eddala On

Multipliers in the multi-configuration build should not be a variable. It should be buildConfiguration [rather than $(buildConfiguration)]and this can be defined as the variable in the variable section with different configurations.

buildConfiguration = Debug, Release