Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Error compiling Xamarin Application on Release mode: System.InvalidOperationException: Sequence contains no elements

Error only occurs when compiling on release mode… on debug mode the compiling occurs without problem… can you help me?

This is the stack trace for error…

en System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
en MonoDroid.Tuner.PreserveApplications.PreserveTypeProperty(CustomAttribute attribute, String property)
en MonoDroid.Tuner.PreserveApplications.ProcessAttributeProvider(ICustomAttributeProvider provider)
en MonoDroid.Tuner.PreserveApplications.ProcessAssembly(AssemblyDefinition assembly)
en Mono.Tuner.SubStepDispatcher.DispatchAssembly(AssemblyDefinition assembly)
en Mono.Tuner.SubStepDispatcher.BrowseAssemblies(IEnumerable`1 assemblies)
en Mono.Tuner.SubStepDispatcher.Process(LinkContext context)
en Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
en Mono.Linker.Pipeline.Process(LinkContext context)
en MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
en Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
en Xamarin.Android.Tasks.LinkAssemblies.RunTask()
en Microsoft.Android.Build.Tasks.AndroidTask.Execute() en /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:lĂ­nea 17 AppMsMovil.Android 5 CompilaciĂłn

This is my Android Options…

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

What your linker settings? Please change it to None, then release it, if you will get the same exception,then please share Android option screenshot that contains all the settings when release.
No Dex compiler was specified, select D8 Dex compiler in the Android project properties => android options => dex compiler D8
Code :

d8

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading