Closed KarthikRajaAKR closed 5 years ago
@KarthikRajaAKR This is not a Forms bug, but an issue with how the linker works. There are a couple of ways to handle this:
In the properties of your iOS project, add the following to 'Additional mtouch arguments' and rebuild the project: --linkskip=System.Core
See Linking Xamarin.iOS Apps for more information.
Instead of skipping the System.Core assembly, you can tell the linker to preserve System.Linq.Queryable
. Just add this line to the AssemblyInfo.cs in your iOS project:
[assembly: Preserve(typeof(System.Linq.Queryable), AllMembers = true)]
Then rebuild the project.
Hi @hartez,
Thank you for the solution.
Your solution can be achieved at sample level but we can not do the same in our control level. We tried with preserve attribute for Queryable extension class and Main class, but it still throws exception. Could you please check and update this?
@KarthikRajaAKR How are you applying the attribute? Can you post the code?
Description
In our custom control, we are using QuerybleExtensions to populate PickerItem, which is working if we set Linker behavior to Don't link but if we set Link framework sdks only or Link All, it shows below exception on loading view.
No generic method 'Select' on type 'System.Linq.Queryable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.
Please check the issue and provide the solution since which breaks major feature in our control.
Steps to Reproduce
Expected Behavior
Control need to be rendered without crash.
Actual Behavior
Exception occurs on loading initial view itself.
Basic Information
Reproduction Link
DataForm.zip