<p>Short answer, yes.</p>

<p>Azure Pipelines <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&amp;tabs=classic" rel="nofollow noreferrer">supports conditional steps</a>. Find these under <code>Control Options</code> in any build step.</p>

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

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

<p><a href="https://i.sstatic.net/UDe5H.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UDe5H.png" alt="enter image description here"></a></p>

CC BY-SA 4.0
2020-01-30T01:11:47.883Z
2020-01-30T01:11:47.883Z
dbJones
<p>Is it possible to force the TransformOnBuild to false using MSBuild parameters in Azure DevOps?</p>

<p>So I Use Azure DevOps Pipeline to build a clickOnce application for a staging environment</p>

<p><a href="https://i.sstatic.net/AC6ck.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AC6ck.png" alt="enter image description here"></a></p>

<p>Here is my MSBuild Arguments</p>

<pre><code>/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\\"
</code></pre>

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

<azure-devops><azure-pipelines>
Is it possible to force to false or true the App.config transformation with arguments on Azure DevOps Pipeline?
Bastien Vandamme
# Is it possible to force to false or true the App.config transformation with arguments on Azure DevOps Pipeline?

(Asked by: username_0 on 2019-12-31)

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

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?

**Tags:** azure-devops, azure-pipelines


---

## 1 answers

### Answer by username_1 on 2020-01-30. Score: 1

Short answer, yes.

Azure Pipelines [supports conditional steps](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=classic). 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](https://i.sstatic.net/UDe5H.png)](https://i.sstatic.net/UDe5H.png)


---

