title: Azure DevOps Release Pipeline Variable Nested/Composed/Expression
body: <p>I have a release pipeline with a variable, but there doesn't seem to be any way to set the value of that variable to something that's evaluated at release time. For example, another variable.</p>
  <p>Here's a real example:</p>
  <p><a href="https://i.stack.imgur.com/3iMR6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3iMR6.png" alt="enter image description here" /></a></p>
  <p>All I want to do is set the value of <code>MyExpressionBasedVariable</code> to the value of <code>MyOtherVariable</code>.</p>
  <p>All the docs and examples online seem to suggest it's possible, but I can't get it to work. I always end up with the literal string rather than the evaluated value.</p>
  <p>I've tried using these different syntaxes:</p>
  <ul>
  <li><code>$(MyOtherVariable)</code></li>
  <li><code>$[variables['MyOtherVariable']]</code></li>
  <li><code>${{variables['MyOtherVariable']}}</code></li>
  </ul>
  <p>I've seen that you can define custom tasks to set variable names as part of the pipeline but this seems massively overkill.</p>
  <p>Essentially all I want to do is rename a key vault secret to a different variable name for convention-based XML variable replacement in config files.</p>
  <p>E.g. I have a secret called <code>this-is-a-secret-name-which-is-a-different-naming-convention-to-my-connectionstrings</code> but I need it in a variable called <code>MySecret-ConnectionString</code>.</p>
  <h1>How do I use the value of another variable in a release pipeline variable?</h1>