Await async TaskEx
TaskEx
was just an extra class which initially shipped with the CTPs of the async/await extensions for C# 5 before .NET 4.5 shipped... and is now part of the Async Targeting Pack (aka the Microsoft.Bcl.Async
NuGet package) in case you want to use async/await but are targeting .NET 4.0 (which doesn't have some of the code required for it).
If you're using .NET 4.5 or later, just use Task.Run
, which does the same thing. (You won't be using the targeting pack, so you won't have TaskEx
.) The async targeting pack can't add a static method to the existing Task
class, hence the need for TaskEx
existing at all.