Forum Xamarin.Android


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Xamarin Linker Problem

NicolasDufourNicolasDufour USMember
edited March 2015 in Xamarin.Android


We are using Xamarin Studio and we are experiencing a problem building our Android project in
release mode with the linker setting: Link SDK Assemblies only.

We are getting the following error:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void System.Security.Cryptography.SHA256CryptoServiceProvider::.ctor()' (defined in 'Rebex.Common, Version=2.0.5430.1, Culture=neutral, PublicKeyToken=1c4638788972655d') from 'Rebex.Common, Version=2.0.5430.1, Culture=neutral, PublicKeyToken=1c4638788972655d' could not be resolved. --->
Mono.Cecil.ResolutionException: Failed to resolve System.Void System.Security.Cryptography.SHA256CryptoServiceProvider::.ctor()
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)

The linker is complaining even if Rebex.Common is not an SDK assembly.
The result is the same event if we add the Rebex.Common assembly to the list of assemblies to ignore.

Help would really be appreciated.


Nick D.


Sign In or Register to comment.