To keep Xamarin applications small and lightweight for mobile devices, Xamarin has created a feature for their compiler called the linker. Its main purpose is to strip unused code out of the core Mono assemblies (such as
System.dll) and platform-specific assemblies (
Xamarin.iOS.dll); however, it can also give you the same benefits if set up to run on your own assemblies. Without running the linker, the entire Mono framework can be around 30 megabytes. This is why linking is enabled by default in device builds, which enables you to keep your applications small.
The linker uses static analysis to work through the various code paths in an assembly. If it determines that a method or class is never used, ...