Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

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.