I am currently trying to build a small portable library for which I need to use async/await. My goal is that I want to be able to use my library on both the .NET 4, as well as the .NET 4.5 runtime. Ideally I would like to use the Microsoft.Bcl.Async pack when targeting .NET 4, whereas for .NET 4.5 I want to use the built-in async/await support without including the Bcl pack.
That said, I would like to have the bcl.async dll excluded from my project when compiling to .NET 4.5, as this gives me warnings about ambigous references between the built-in async of C# 5 in .NET 4.5 and the bcl.async pack.
Is this possible, if so how, else what would be a better way of going about this problem?
Microsoft.Bcl.Async
. – Stephen Cleary