Saturday, July 16, 2011

C# await for MSBuild

The async CTP that adds the C# await keyword doesn’t include an awaitable MSBuild.  It’s easy to add yourself.  Just copy and paste the the BuildSubmissionAwaitExtensions class from the code below somewhere in your project and you’ll be able to await on MSBuild.  Also included below is a sample of what it might look like.

Friday, July 15, 2011

C# await for WaitHandle

The async CTP that adds the C# await keyword doesn’t include an awaitable WaitHandle.  It’s easy to add yourself.  Just copy and paste the following code somewhere in your project and you’ll have an awaitable WaitHandle.

Warning: don't use this on AutoResetEvents, or the behavior may not be what you expect.