title: How can I bind output values to my async Azure Function?
body: <p>How can I bind my outputs to an async function?  The usual method of setting the parameter to <code>out</code> doesn't work with async functions.</p>
  <h3>Example</h3>
  <pre><code>using System;
  
  public static async void Run(string input, TraceWriter log, out string blobOutput)
  {
      log.Info($&quot;C# manually triggered function called with input: {input}&quot;);
      await Task.Delay(1);
  
      blobOutput = input;
  }
  </code></pre>
  <p>This results in a compilation Error:</p>
  <pre><code>[timestamp] (3,72): error CS1988: Async methods cannot have ref or out parameters
  </code></pre>
  <p>Binding used (fyi)</p>
  <pre><code>{
    &quot;bindings&quot;: [
      {
        &quot;type&quot;: &quot;blob&quot;,
        &quot;name&quot;: &quot;blobOutput&quot;,
        &quot;path&quot;: &quot;testoutput/{rand-guid}.txt&quot;,
        &quot;connection&quot;: &quot;AzureWebJobsDashboard&quot;,
        &quot;direction&quot;: &quot;out&quot;
      },
      {
        &quot;type&quot;: &quot;manualTrigger&quot;,
        &quot;name&quot;: &quot;input&quot;,
        &quot;direction&quot;: &quot;in&quot;
      }
    ],
    &quot;disabled&quot;: false
  }
  </code></pre>