Bug 51259 - Accessing count property of the queryable collection leads to “No method count exist invalid operation exception” and accessing 'oftype' property leads to "No method 'OfType' exists on type 'System.Linq.Queryable'"
Summary: Accessing count property of the queryable collection leads to “No method coun...
Status: RESOLVED DUPLICATE of bug 49053
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-01-06 05:43 UTC by Divakar
Modified: 2017-01-06 18:29 UTC (History)
5 users (show)

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 Developer Community or GitHub 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:

Description Divakar 2017-01-06 05:43:48 UTC
This bug is related to the below one,
Comment 1 Divakar 2017-01-06 05:44:44 UTC
Hi Team,

Thanks for the update and workaround.

The first workaround is fine and we are already aware of it. Am yet to try the second one by writing my own preserve attribute. 

But my question is different, I expect a solution for the reported issue rather than a workaround. This was working fine in earlier versions of Xamarin without disabling the linker or preserving, but has got broken again. It's a long story to explain. 

As customers we expect an issue to be fixed but what happens nowadays is a workaround is given and the ticket is marked as Resolved. Can you please let us know when this will be internally fixed in Xamarin? Or do you mean that this bug cannot be fixed in Xamarin? 
I hope you find this logic well. We can not inform all our customer that there is a linker problem and you have to use this workaround in your sample. So we need an internal fix for this.

Also, we have experienced one more issue called "No method 'OfType' exists on type 'System.Linq.Queryable'" while accessing System.Linq.Queryable.

So, could you please provide the fixes for the above-mentioned issues asap?
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2017-01-06 18:29:12 UTC
## Non-engineering team preliminary sorting

The description given in Comment 1 appears to be identical to Bug 49053, Comment 2, and by a bit of good luck the iOS engineering team has now provided additional clarification for that comment in Bug 49053, Comment 3.

I will accordingly tentatively mark this bug as resolved as a duplicate of that bug, but feel free to reopen this bug if you have additional follow-up questions after Bug 49053, Comment 3.  (I suspect this new bug was filed because the reporter on Bug 49053 was a Xamarin team member, so the user from Comment 0 of this bug (Bug 51259) would not be able to reopen that bug themselves for additional followup.  That's a good approach, but by a bit of luck the engineering team already picked back up on the additional question in Bug 49053 despite the "resolved" status.)

* * *

As mentioned in Bug 49053, Comment 3, for:

> we have experienced one more issue called "No method 'OfType' exists
> on type 'System.Linq.Queryable'"

Whenever you get a chance, please do file a new bug report for that issue that includes a test case and as many other details as possible [1].  Thanks in advance!

[1] https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/howto-file-bug/

*** This bug has been marked as a duplicate of bug 49053 ***