Async lambda to Expression<Func<Task>>

C# can only convert lambda expression to Expression tree only if code can be represented by Expression Tree, if you notice, there is no equivalent of "async" keyword in Expressions in System.Linq.Expressions

So not only async, but anything in C# that has no equivalent expression in provided Expressions, C# can't convert it to Expression Tree.

Other examples are

  1. lock
  2. unsafe
  3. using
  4. yield
  5. await

The error is pretty self explanatory:

"Async lambda expressions cannot be converted to expression trees"

It's also documented in the Async/Await FAQ.

And for good reason, async-await is a compiler feature on top of the framework. Expressions are used to translate code to other commands (like SQL). These other languages probably don't have an async-await equivalent so enabling it via expressions doesn't seem worth it.

So no, I see no workaround.