title: Release Azure Functions and file transformations
body: <p>I have a lot of Azure Functions projects to deploy on Azure. I set build and pipeline for them. For example, this is one <strong>Release</strong> for an Azure Function.</p>
  
  <p><a href="https://i.stack.imgur.com/T0Nhv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T0Nhv.png" alt="Azure DevOps Release"></a></p>
  
  <p>Under <strong>Variables</strong> I defined all variables for the environments (one for dev, one for stage and one for production).</p>
  
  <p><a href="https://i.stack.imgur.com/kIkJj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kIkJj.png" alt="Variables"></a></p>
  
  <p>There is only one step for deploying the Azure Functions on Azure. I want to add/replace in the <code>local.settings.json</code> the right settings for an environment. I'm not be able to find how to configure that.</p>
  
  <p><a href="https://i.stack.imgur.com/lAJLp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lAJLp.png" alt="Deploy Azure Function App"></a></p>
  
  <p>In other project, if I use <code>Azure App Service Deploy</code>, there is a section <code>File Transforms &amp; Variable Substitution Options</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/oNSQO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oNSQO.png" alt="File transformations"></a></p>
  
  <p>How can I do the same in the release of an Azure Functions? What is the correct strategy or best practice?</p>
  
  <h2>Update and Solution</h2>
  
  <p>I thought it was much straightforward. I think this is the solution. In the <strong>App settings</strong> under <strong>Application and Configuration Settings</strong>, I have to specified each variable and its value using the <code>...</code> in that line.</p>
  
  <p><a href="https://i.stack.imgur.com/lzcc0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lzcc0.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/9VJTE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9VJTE.png" alt="enter image description here"></a></p>
  
  <p>I can type or copy in this field. The syntax is </p>
  
  <pre><code>-variableName "$(variablename)"
  </code></pre>
  
  <p>I'm using quotes because if in the value there is any space (for example in the connection string you have <code>Initial Catalog</code>) DevOps raises an error. For array, I'm still using <code>:</code>.</p>