Good afternoon,
I'm in the process of exploring Prism to develop some Xamarin Forms Applications.
I used the template extension to scaffold the new project, with DryIoc.
It is using the Prism pre-release version (7.0.0.168-pre).
I created a new view (LoginView), with absolutely no controls inside whatsoever.
If i try to deploy the newly created app to android, without linker enabled, or with the linker set to sdk, it deploys and runs just fine.
If i try to deploy with the linker set to all, it fails with the error:
System.TypeInitializationException: The type initializer for 'Registry' threw an exception. ---> System.TypeInitializationException: The type initializer for 'DryIoc.WrappersSupport' threw an exception. ---> DryIoc.ContainerException: Argument of type MethodInfo is null.
12-15 13:59:56.977 I/MonoDroid(17130): at DryIoc.Throw.ThrowIfNull[T] (T arg, System.Int32 error, System.Object arg0, System.Object arg1, System.Object arg2, System.Object arg3) [0x0002b] in <e3b94bea7996441fb08b4feabdd2e9d9>:0
12-15 13:59:56.977 I/MonoDroid(17130): at DryIoc.WrappersSupport..cctor () [0x0013e] in <e3b94bea7996441fb08b4feabdd2e9d9>:0
12-15 13:59:56.977 I/MonoDroid(17130): --- End of inner exception stack trace ---
12-15 13:59:56.977 I/MonoDroid(17130): --- End of inner exception stack trace ---
12-15 13:59:56.977 I/MonoDroid(17130): at Prism.DryIoc.PrismApplication.CreateContainer () [0x00006] in <f391f9c2cac64683a56d0cb59825014a>:0
12-15 13:59:56.977 I/MonoDroid(17130): at Prism.PrismApplicationBase1[T].Initialize () [0x0001e] in
12-15 13:59:56.977 I/MonoDroid(17130): at Prism.PrismApplicationBase1[T].InitializeInternal () [0x00006] in <feb5c9b233df462bb483ff4dd8463238>:0
12-15 13:59:56.978 I/MonoDroid(17130): at Prism.PrismApplicationBase1[T]..ctor (Prism.IPlatformInitializer1[T] initializer) [0x00031] in <feb5c9b233df462bb483ff4dd8463238>:0
12-15 13:59:56.978 I/MonoDroid(17130): at Prism.DryIoc.PrismApplication.set_ModuleCatalog (Prism.Modularity.IModuleCatalog value) [0x00000] in <f391f9c2cac64683a56d0cb59825014a>:0
12-15 13:59:56.978 I/MonoDroid(17130): at CABuffet.App..ctor (Prism.DryIoc.IPlatformInitializer initializer) [0x00000] in C:\Projects\CABuffet\CABuffet\CABuffet\App.xaml.cs:18
12-15 13:59:56.978 I/MonoDroid(17130): at CABuffet.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00027] in C:\Projects\CABuffet\CABuffet\CABuffet.Android\MainActivity.cs:20
I have created my own LinkerDescription file to preserve the members, yet i have little experience with linker.
```
```
Can anyone point me into the right direction?
You should reach out to the Xamarin forums for help with their platform. When you get an answer, you can place the answer here to help anyone else with a similar question.
This is my basic linker config for Dryioc that I use, using all this gives to me 25mb size. But, obviously, you need to refine, add and remove things. Its a good start. ( It basic skip things ^_^' )
This is a NETStandard.Library, using Xamarin.forms 2.5.0.91635
<assembly fullname="SQLite-net">
<type fullname="*" />
</assembly>
<assembly fullname="SQLitePCLRaw.batteries_v2">
<type fullname="*" />
</assembly>
<assembly fullname="SQLitePCLRaw.core">
<type fullname="*" />
</assembly>
<assembly fullname="DryIoc">
<type fullname="*" />
</assembly>
<assembly fullname="System">
<type fullname="*" />
</assembly>
<assembly fullname="mscorlib">
<type fullname="*" />
</assembly>
<assembly fullname="Prism">
<type fullname="*" />
</assembly>
<assembly fullname="Prism.DryIoc.Forms">
<type fullname="*" />
</assembly>
<assembly fullname="MyProjectPCL">
<type fullname="*" />
</assembly>
<assembly fullname="Prism.Forms">
<type fullname="*" />
</assembly>
<assembly fullname="Plugin.Permissions">
<type fullname="*" />
</assembly>
<assembly fullname="Xamarin.Forms.Maps">
<type fullname="*" />
</assembly>
<assembly fullname="Newtonsoft.Json">
<type fullname="*" />
</assembly>
Hey, thanks for that!
It's working perfectly, thanks a lot! :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
This is my basic linker config for Dryioc that I use, using all this gives to me 25mb size. But, obviously, you need to refine, add and remove things. Its a good start. ( It basic skip things ^_^' )
This is a NETStandard.Library, using Xamarin.forms 2.5.0.91635