Xamarin iOS Linker Not Working


I have an application that has an android and ios project with shared code. The android application works perfect and uses the SDK Only linker. I also have a Linker file to enforce linker not removing used functions. Same situation in the iOS project however, doing the same thing doesn't work. It removes something from EF and throws this exception:
"The type initializer for 'Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions' threw an exception. ---> System.InvalidOperationException"

This whole code base works perfectly fine without the linking. I've added a bunch of mtouch arguments to try and skip it but that ain't working either.

I'm about to add every DLL in NuGet repository which will make the Linker useless. Is this a bug for the iOS Linker or what am I missing here? I've read the documentation [https://docs.microsoft.com/en-us/xamarin/ios/deploy-test/linker?tabs=windows] and searched everywhere on the internet and nothing comes up. Any help is appreciated.


Sign In or Register to comment.