Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 for Bug 13074 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
I have a WCF service that has a Task<bool> return type in the service Interface. It would be great if when adding a service reference if you could support the newer .NET 4.5 System.Threading.Task based methods so we can use the async await pattern. Presently XS doesn't know how to handle these service references with task based methods. As you're adding async await (.NET 4.5) support in the upcoming release which I'm in the beta channel testing, having this available would be great.
Are there any news or plans about this topic? This feature is even useful if you want to create a proxy reference for soap services that should use async/ await instead of events.
The lack of support for Task-based service references manifests itself in InvalidOperationExceptions when sharing generated code with .Net Framework, even though the Xamarin code doesn't call the async method. See e.g. https://bugzilla.xamarin.com/show_bug.cgi?id=46917
When creating a channel, the contract description is generated, and the operation description for the async method throws an InvalidOperationException: Operation 'FooAsync' contains a message with parameters. Strongly-typed or untyped message can be paired only with strongly-typed, untyped or void message.
The source of the exception is https://github.com/mono/mono/blob/0bcbe39b148bb498742fc68416f8293ccd350fb6/mcs/class/referencesource/System.ServiceModel/System/ServiceModel/Dispatcher/OperationFormatter.cs#L515
It seems likely that the root cause is that MessageDescription.IsTypedMessage is returning false for the return type System.Threading.Tasks.Task<MyTypedMessage>.
Seems to be a very common issue. See: https://duckduckgo.com/?q=InvalidOperationException%3A+Operation+contains+a+message+with+parameters.+Strongly-typed+or+untyped+message+can+be+paired+only+with+strongly-typed%2C+untyped+or+void+message.&t=hf&ia=qa
OH, BTW, the issue is not limited to Mac OS. Android has the same problem, and probably iOS too.