'System.TypeLoadException' when using Async for WP7.5 version 1.0.11-beta - by Sgt-Riggs

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 768521 Comments
Status Closed Workarounds
Type Bug Repros 5
Opened 10/24/2012 2:45:15 AM
Access Restriction Public


When using 'Microsoft.Bcl.Async' version 1.0.11-beta in Windows Phone 7.5 project, the app crashes when it gets to Task-based awaitable code with the following exception:

"An unhandled exception of type 'System.TypeLoadException' occurred in *.dll.
Additional information: File or assembly name 'System.Threading.Tasks, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A', or one of its dependencies, was not found."

The build output contains the following lines (they repeat two times for two projects that use 'Microsoft.Bcl.Async'):

>  Consider app.config remapping of assembly "System.Threading.Tasks, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "" [] to Version "" [...\packages\Microsoft.Bcl.1.0.11-beta\lib\sl4-windowsphone71\System.Threading.Tasks.dll] to solve conflict and get rid of warning.
>  Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "" [] to Version "" [...\packages\Microsoft.Bcl.1.0.11-beta\lib\sl4-windowsphone71\System.Runtime.dll] to solve conflict and get rid of warning.

Since it's a Windows Phone project, I can't use app.config to resolve this issue like it's described in 'Known Issues' document for 'Microsoft.Bcl'.
Sign in to post a comment.
Posted by ngmO11 on 1/24/2013 at 3:28 PM
ConfigureAwait(false) doesn't seems to ignore the captured context.

The same code works in .NET v4.5 but with this library it doesn't.

- ngm
Posted by ThumbGen on 1/16/2013 at 5:05 AM
I get the same error... please fix it!
Posted by ngmO11 on 11/5/2012 at 1:06 PM

I still see reference to System.Threading.Tasks.dll v1.5.11.0 in Microsoft.Threading.Tasks.dll v1.0.12.0:

.assembly extern System.Threading.Tasks
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
.ver 1:5:11:0

I'm getting following Exception:

Type=System.IO.FileLoadException, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message=Could not load file or assembly 'System.Threading.Tasks, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I have only System.Threading.Tasks.dll v2.5.11.0 in my bin.


- ngm
Posted by Rajen Kishna (MSFT) on 10/26/2012 at 6:37 AM
Ignore my comment, it's fixed.
Posted by Rajen Kishna (MSFT) on 10/26/2012 at 6:07 AM
The exception still occurs on version 1.0.12.
Posted by Microsoft on 10/25/2012 at 5:31 PM
Thanks again for reporting the issue. This was indeed a bug in our build that caused an incorrect version in the assembly references. We've uploaded a new NuGet package. The new version is 1.0.12 and is available here:


All the best,
Immo Landwerth
Program Manager, .NET Framework Team
Posted by Sgt-Riggs on 10/25/2012 at 4:11 AM
Great, waiting for the update. The release of WP8 SDK is few days aways, as I understand, so it would be great if such obvious issues are fixed.
Posted by Microsoft on 10/24/2012 at 7:48 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Microsoft Visual Studio Connect Support Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 10/24/2012 at 4:40 PM
Thanks for reporting the issue. After looking at the assembly references it seems to be an issue with our build having been compiled against the wrong version of the Microsoft.Bcl NuGet package.

We'll update the Microsoft.Bcl.Async package accordingly.
Posted by Microsoft on 10/24/2012 at 2:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)