Search code examples
mvvmcross

Using MVVMCross IoC with Link All Assemblies


I'm just reading up about the inbuilt IoC of MVVM Cross and how it makes heavy use of reflection. Just wondering, does this cause issues with Xamarin linking? What are people finding best practise in this area? Using "Link SDK assemblies only" or perhaps configuring IoC in a way that avoids reflection?

Thanks in advance :-)


Solution

  • Both MvvmCross IoC and MvvmCross binding rely on Reflection.

    Because of this, users often use "Link SDK assemblies only" and often use "LinkerPleaseIgnore" files.

    You can read more about this on:

    The MvvmCross nuget packages ship with default "LinkerPleaseIgnore" files - e.g. https://github.com/MvvmCross/MvvmCross/blob/v3.1/nuspec/TouchContent/LinkerPleaseInclude.cs.pp