I developed an application using Xamarin and C# and I want to release it but when I try to release my application with Visual Studio 2019 or 2022(I tried both), I get this error:
Mono.Linker.MarkException: Error processing method: 'System.Void Plugin.CloudFirestore.FirestoreSettings::.cctor()' in assembly: 'Plugin.CloudFirestore.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean Firebase.Firestore.FirebaseFirestoreSettings::AreTimestampsInSnapshotsEnabled()
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.RunTask()
at Microsoft.Android.Build.Tasks.AndroidTask.Execute()
I updated all my packages to the last version available and I deleted Bin and obj foders but without result..
During debug, it works correctly. If I test the application on my phone or with android emulator, it works.
Do you have any suggestion?