Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2020-01-30T01:11:47.883Z
Answers: 2020-01-30T01:11:47.883Z
Answers: dbJones
Body: <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>
  
Tags: <azure-devops><azure-pipelines>
Title: Is it possible to force to false or true the App.config transformation with arguments on Azure DevOps Pipeline?
UserDisplayName: Bastien Vandamme
ThreadText: # 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
  
  [![enter image description here](https://i.sstatic.net/AC6ck.png)](https://i.sstatic.net/AC6ck.png)
  
  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)
  
  
  ---
  
  