Release mode linker error

abvabv USMember ✭✭✭
edited July 2016 in Xamarin.Android

Hi,
I build my code in Release mode it shows the 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.Web.AspNetHostingPermissionLevel' (defined in 'Google.GData.Client, Version=2.0.1.0, Culture=neutral, PublicKeyToken=04a59ca9b0273830') from 'Google.GData.Client, Version=2.0.1.0, Culture=neutral, PublicKeyToken=04a59ca9b0273830' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Web.AspNetHostingPermissionLevel
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArgument(Collection1& fields, Collection1& properties)
at Mono.Cecil.SignatureReader.ReadCustomAttributeNamedArguments(UInt16 count, Collection1& fields, Collection1& properties)
at Mono.Cecil.SignatureReader.ReadSecurityAttribute()
at Mono.Cecil.MetadataReader.ReadSecurityDeclarationSignature(SecurityDeclaration declaration)
at Mono.Cecil.SecurityDeclaration.m__1(SecurityDeclaration declaration, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.SecurityDeclaration.Resolve()
at Mono.Cecil.SecurityDeclaration.get_HasSecurityAttributes()
at Mono.Linker.Steps.MarkStep.MarkSecurityDeclaration(SecurityDeclaration sd)
at Mono.Linker.Steps.MarkStep.MarkSecurityDeclarations(ISecurityDeclarationProvider provider)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
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 Xamarin.Android.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__20.MoveNext() (MSB4018)

This error is not showing while build in Debug mode,please help me to solve this.

Posts

  • abvabv USMember ✭✭✭
    edited July 2016

    Problem solved after deleting the 'Google.GData.Client' from my references.

Sign In or Register to comment.