C # 5 and .Net 4.5 - Compiler Tricks or Library Support?

I read a lot about how async / awake runs (internally) as a state machine and would like to know if I can use the VS2012 compiler, but still use Net version 4 as the runtime to use these new features?

I remember that I could do this with a few new features of Net 4, still using Net 3.5, but with the VS2010 compiler.

Thanks, Martin.

+4
source share
1 answer

To the right of the asynchronous programming page of Visual Studio:

http://msdn.microsoft.com/en-us/vstudio/async.aspx

If your Visual Studio 2012 project needs to target Silverlight 5 or the .NET Framework 4.0, you can use Async language support by downloading the Async Targeting Pack for Visual Studio 2012 . This pack is not required for projects targeting the .NET Framework 4.5 or .NET for Windows applications.

So, you can download the asynchronous targeting package for Visual Studio 2012 and use the asynchronous programming features while still targeting the .NET Framework 4.

+3
source

All Articles