Explain what is linking process on Xamarin

Technology CommunityCategory: XamarinExplain what is linking process on Xamarin
VietMX Staff asked 3 years ago

Xamarin applications use a linker to reduce the size of the application.The linker employes static analysis of your application to determine which assemblies are actually used, which types are actually used, and which members are actually used. The linker then behaves like a garbage collector, continually looking for the assemblies, types, and members that are referenced until the entire closure of referenced assemblies, types, and members is found. Then everything outside of this closure is discarded.

Linking is based on static analysis. Consequently, anything that depends upon the runtime environment won’t be detected. As the linker is a static tool, it can not mark for inclusion types and methods that are called through reflection, or dynamically instantiated.