

This is the easiest and safest type of linking and must be your default. As such, any of your third-party libraries will not be affected. All other assemblies (such as your code) are not linked. The Link SDK Assemblies option only links assemblies that come with Xamarin. This setting is not usually recommended for production builds. The Don’t Link option turns off the linker this is useful for troubleshooting runtime failures in order to see whether or not the linker is responsible. Link All Assemblies ( SDK and User Assemblies).Link SDK Assemblies ( SDK Assemblies Only).The primary mechanism for controlling the linker is the Linker Behavior ( Linking in Visual Studio) drop-down within the Project Options dialog box. If you check the official documentation for Linking on Android & Linking on iOS, it shows you how to perform this operation. Then everything outside of this closure is discarded.

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. The linker employs a static analysis of your application to determine which assemblies are actually used, which types are actually used, and which members are actually used. Xamarin applications use a linker to reduce the size of the application. There are a few things you can do to make your app lighter when developing with Xamarin. My inspiration for writing this post came from this awesome blog by Adam Pedley on Reducing app file size in Xamarin Forms, where he has added a lot of important pointers (I’ve also picked up some of the content from his blog). They can be really heavy! But then the question is, how do you deal with this? Let’s find out! This is especially true when it comes to developing with Xamarin-large bundle sizes is a well-known drawback with Xamarin apps. As mobile application developers, we’re all aware that the app bundle size (APK/IPA) is always a matter of concern.
