Failed to resolve System.Void System.Threading._ThreadPoolWaitCallback::SetDispatcher

I'm trying to release a Xamarin.Forms application, but when I change to release in the configuration for the Android project and build I get the following error:

Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'System.Void System.Threading._ThreadPoolWaitCallback::SetDispatcher(System.Func2<System.Func1<System.Boolean>,System.Boolean>)' (defined in assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065') with scope 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void System.Threading._ThreadPoolWaitCallback::SetDispatcher(System.Func2<System.Func1<System.Boolean>,System.Boolean>)
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()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Run(Pipeline pipeline, LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
--- End of inner exception stack trace ---
at Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()


Configuration:

  1. Compile using Android version:(Target Framework) =>
    User Latest Plateform(Android 7.0 (Nougat))
  2. Minimum Android version: => Android 4.0.3 (API Level 15 - Ice Cream Sandwich)
  3. Target Android version: => Use Compile using SDK version
  4. Linking : => SDK Assemblies Only
Sign In or Register to comment.