title: Using async-await on .net 4
body: <p>I'm currently starting to create an application that would profit a lot from C# 5's async-await feature. But I'm not sure which version of VS and of the async runtime to use.</p>
  
  <p>Looking at OS popularity charts, I'll need to support Windows XP for another three years or so. It looks like .net 4.5 runs only on newer versions of Windows, so I need to target .net 4.0. The development machines use Windows 7, so using a newer version of VS is not a problem.</p>
  
  <p><strong>Now I need to first choose a compiler for doing this:</strong></p>
  
  <ul>
  <li>VS2010 with AsyncCTP</li>
  <li>VS2012 Preview (and final once it arrives), setting the target to .net 4.0</li>
  <li>Mono (Looks like 2.12 has async-await, I prefer/am used to VS over MonoDevelop as IDE)</li>
  </ul>
  
  <p>Which one has fewer code-gen bugs? Looking at <a href="http://msmvps.com/blogs/jon_skeet/archive/2012/01/12/eduasync-part-18-changes-between-the-async-ctp-and-the-visual-studio-11-preview.aspx" rel="noreferrer">Jon Skeet's blog</a> the VS2012 Preview uses a never code-generator than the CTP.</p>
  
  <p><strong>And more importantly which runtime to use?</strong></p>
  
  <p>Does VS2012 contain a redistributable async runtime for use with .net 4?</p>
  
  <p>I managed to compile code, with the preview, by referencing the AsyncCTP runtime. But since the CTP has strange licensing conditions, that doesn't look like a good long term solution.</p>
  
  <p>Or should I use a third party implementation? Perhaps mono has one?</p>
  
  <p>For distributing the library I prefer simply putting the dll in the same directory as the application, instead of some kind of installer.</p>
  
  <p>I'd also like it if my binaries would work without changes on mono+Linux/MacOS. So the runtime should either be compatible with whatever mono (2.12 probably) has built in, or allow use on non windows OSs.</p>