Is it possible to force the TransformOnBuild to false using MSBuild parameters in Azure DevOps?

So I Use Azure DevOps Pipeline to build a clickOnce application for a staging environment

enter image description here

Here is my MSBuild Arguments

/target:publish /p:ApplicationVersion=$(Build.BuildNumber) /p:InstallURL=http://app-staging.example.com/ /p:PublishURL=http://app-staging.example.com/ /p:UpdateEnabled=true  /p:UpdateMode=Foreground  /p:ProductName="App Staging" /p:OutputPath="$(build.ArtifactStagingDirectory)\Publish\\"

Is it possible to force to false or true the App.config transformation with arguments?

1 Answer 1


Short answer, yes.

Azure Pipelines supports conditional steps. Find these under Control Options in any build step.

How you build your custom conditions will depend on what triggers your step to true/false.

The screenshot has an example of how we control a build step based on a build variable (defined in the variables tab of the pipeline).

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.