Monday, October 29, 2012

How to use async/await in Silverlight 4, Windows Phone 7 or in Portable Class Libraries? [closed]

How to use async/await in Silverlight 4, Windows Phone 7 or in Portable Class Libraries? [closed]

The new async/await syntax of C# 5 is natively supported in WinRT, .NET 4.5 and Windows Phone 8. Up until 22 Oct 2012 it was additionally available for .NET 4.0 and Silverlight 5 via the Async Targeting Pack from June 2012.

On 22 Oct 2012, Microsoft pre-released a package called Microsoft.Bcl.Async additionally for Silverlight 4, Windows Phone 7.5 and, what's probably most surprising, also for Portable Class Libraries targeting all these platforms:

Using async/await without .NET Framework 4.5:

To add a reference to the updated NuGet Package, right click the project, select "Manage Package References" and search for Microsoft.Bcl.Async. Make sure you selected the "Online" tab on the left hand side and the top left drop down says "Include Prerelease".

No Answer and comments so far




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog