async/await keywords not available in .net 4.0

You’re not going to get a better answer than Jon Skeet’s.

The only supported way to do this is to use VS2012 with Microsoft.Bcl.Async.

VS2010 is very difficult to get working with async/await. There was an old Async CTP package (which had many bugs that were never fixed) that acted as an “add-on”https://stackoverflow.com/”partial replacement” to VS2010. However, that package never worked well with the VS2010 updates. So, you’d have to first find a version of one of the old CTP installers, play around with installing some VS updates, and then see if the CTP works. If you’ve already installed all your VS2010 updates then no version of the CTP will work. I think once you find an update situation where you can install a working CTP, then you can install the other updates.

After all this work, you’ll still end up with a bug-ridden (and definitely unoptimized) implementation of async.

Or, you can do as Jon Skeet suggested and download the free version of VS2012 Express with Microsoft.Bcl.Async and have a fully supported solution.

Leave a Comment