2
votes

I'm gotting this error message when i run my android projet. It is a portable project.

The "LinkAssemblies" task failed unexpectedly. Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Reference to metadata item 'Mono.Security.Interface.MonoTlsProviderFactoryDelegate' (defined in 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065') from 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Mono.Security.Interface.MonoTlsProviderFactoryDelegate at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference) at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkField(FieldReference 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.Process(LinkerOptions options, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute() --- 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() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

This is my target:

enter image description here

Any idea how to fix this ?

1
You have an incorrect assembly reference your Xamarin.Android project as it is pulling in .MonoTlsProviderFactoryDelegate from Xamarin.iOSSushiHangover
Do you know where is it from ? I dont found this name on my project.Pedro Franco
Check your assembly references in your each of your projects, somewhere you probably added a manual reference to the wrong assembly...SushiHangover

1 Answers

1
votes

I found a weird reference to Xamarin.iOS. When I removed that, it worked well. screenshot from my PC