Bug 4150 - Missing method System.Threading.Tasks.Task::WhenAll(Task[])
Summary: Missing method System.Threading.Tasks.Task::WhenAll(Task[])
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-03-29 09:46 UTC by soywiz
Modified: 2012-04-04 05:40 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description soywiz 2012-03-29 09:46:31 UTC
I have compiled a project using Visual Studio 11 (last beta) that uses WhenAll Task method like this:

await Task.WhenAll(Task1, Task2);

On .NET 4.5 runs just fine, but running with mono 2.11 Trunk (Mono JIT compiler version 2.11 (master/4751bee Thu Mar 29 13:55:24 CEST 2012)) causes this error:

"Missing method System.Threading.Tasks.Task::WhenAll(Task[]) in assembly /usr/local/lib/mono/4.5/mscorlib.dll"

Here the definition seems to be right:
https://github.com/mono/mono/blob/master/mcs/class/corlib/System.Threading.Tasks/Task.cs

I have disassembled that DLL file with ILSpy and it has the method:
public static void WaitAll(params Task[] tasks);

The part just different is the "params", but since it is a sintactical sugar, it shouldn't be the problem. Also I have tested:

await Task.WhenAll(new[] { Task1, Task2 });

and has the same problem.
Comment 1 soywiz 2012-03-29 09:49:11 UTC
Sorry, my fault:

Is that "WhenAll" method is missing (that is the asynchronous equivalent for "WaitAll").
Comment 2 Marek Safar 2012-04-04 05:40:21 UTC
Fixed in master