title: How to use awaitable inside async?
body: <p>I'm fairly new to F# and as practice I'm currently writing a module that has a lot of interop with C# libraries.</p>
  <p>When library code returns me <code>Task</code>, it's not a problem - I already found a package that enables <code>let!</code> with tasks.</p>
  <p>Right now I'm using <a href="https://github.com/Tyrrrz/CliWrap" rel="nofollow noreferrer">cliwrap</a> and its <code>ExecuteAsync()</code> method returns not a <code>Task</code>, but some other awaitable type(you can <code>await</code> it in C# and it has <code>GetAwaiter()</code> method).</p>
  <p>So far I came up with the following code to use it(please ignore usage of <code>test</code> and <code>()</code>, its temprorary for debugging):</p>
  <pre><code> let testLaunchDelayed = async {
                          let cmd = Cli.Wrap(@&quot;C:\Launcher\Launcher.exe&quot;).WithArguments(&quot;--TestName &quot; + testName)
                          let test = cmd.ExecuteAsync().GetAwaiter().GetResult()
                          ()
                      }
                      Async.StartImmediate testLaunchDelayed
  </code></pre>
  <p>It seems to work, but using <code>.GetAwaiter().GetResult()</code> feels wrong. Is there a better way ?</p>
  <p><strong>Update</strong>
  Tried using <code>taskbuilder</code>, ended up with this:</p>
  <pre><code>async {
        let cmd = Cli.Wrap(@&quot;C:\Test\git\tests\func\nunit\AllBin\publish_win10-x64\CommonTestLauncher.exe&quot;).WithArguments(&quot;--TestName &quot; + testName);
        let! cmdTask = task{return! cmd.ExecuteAsync()}
        ()
  }
  </code></pre>