Error F# - c# async calls : converting Threading.Tasks.Task<MyType> to Async<'a>
问题 When I try to call an async method that is in C# library from my F# code. I get the following compilation error. This expression was expected to have type Async<'a> but here has type Threading.Thread.Tasks.Task SendMessageAsync is in C# library and returns Threading.Thread.Tasks.Task<MyType> let sendEmailAsync message = async { let! response = client.SendMessageAsync(message) return response } 回答1: For converting between Task<'T> and Async<'T> there is a built-in Async.AwaitTask function. To