Wednesday, October 15, 2014

Bug in Async BCL With Portable class libraries

Any of you try to use async framework inside the Portable Class Library (PCL)? Is it working ?
First instance it is not. There is a known bug in Async Framework with Poratable Class Libraries.
It will not detect the async and await correctly with task based operations

How to Fix
First install the BCL Nuget package to he your PCL (Microsoft.Bcl.Async)
in Console -




PM> Install-Package Microsoft.Bcl.Async

Then replace following tags with relevant replacement tag 
    <dependentAssembly>
        <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0" />
      </dependentAssembly>
    </assemblyBinding>

0 comments: