Forum Xamarin.Android

Is it possible to preserve ALL constructors when using Linker?

AlexKeyAlexKey USMember ✭✭

It looks like most of the issues with the Linker related to the fact that it removes constructors which are necessary to create objects via reflection. There is of course a chance that an instance method needs to be preserved to be called via reflection as well but the majority is dynamic creation of objects. Dependency services, serialization and many other things rely on that. I think the overhead will not be huge if the Linker preserves all the constructors for the types which are identified to be referenced anywhere in the code. Is is possible to do it? Maybe there are options to the Linker which control this behavior?

Sign In or Register to comment.