Bug 28021 - Android Release LinkAssemblies Exception against Acr.XamForms
Summary: Android Release LinkAssemblies Exception against Acr.XamForms
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.5
Hardware: PC Windows
: Highest blocker
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-13 15:56 UTC by Matt Butler
Modified: 2015-03-31 10:30 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Matt Butler 2015-03-13 15:56:18 UTC
On Xamarin 1.3.5.6335 we get this same link error.  Compile Version = 21,
Minimum Target = 15, Target Version = 21.

There was a previous ticket about this, but it is closed and the solution in it does not work for us.  

Exception:

Error	10	The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Xamarin.Forms.BindableProperty Xamarin.Forms.BindableProperty::Create(System.Linq.Expressions.Expression`1<System.Func`2<!!0,!!1>>,!!1,Xamarin.Forms.BindingMode,Xamarin.Forms.BindableProperty/ValidateValueDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangedDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangingDelegate`1<!!1>,Xamarin.Forms.BindableProperty/CoerceValueDelegate`1<!!1>)' (defined in 'Acr.XamForms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Acr.XamForms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Xamarin.Forms.BindableProperty Xamarin.Forms.BindableProperty::Create(System.Linq.Expressions.Expression`1<System.Func`2<!!0,!!1>>,!!1,Xamarin.Forms.BindingMode,Xamarin.Forms.BindableProperty/ValidateValueDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangedDelegate`1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangingDelegate`1<!!1>,Xamarin.Forms.BindableProperty/CoerceValueDelegate`1<!!1>)
   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.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.<ExecuteInstantiatedTask>d__20.MoveNext()	Journyx.PCL.X3.Android
Comment 1 Matt Butler 2015-03-13 15:57:30 UTC
We only get this exception in Release Mode, not in debug.
Comment 3 Atin 2015-03-25 07:43:02 UTC
I have checked this issue and unable to reproduce the given behavior.when I set Compile Version 21,Minimum Target = 15, Target Version = 21 then app deploy successfully in release mode as shown in screencast:

Screencast: http://www.screencast.com/t/tDfKGMkvAX
Ide Logs: https://gist.github.com/Arpit360/69e91f14145e2d5f084f

Please let me know if I missed any step to reproduce this issue.

Xamarin.Forms:1.4.1.6347-pre2

Environment Info:

=== Xamarin Studio ===

Version 5.8.2 (build 5)
Installation UUID: 0ab3f31c-da0f-40d3-be27-a8ade9c61903
Runtime:
	Microsoft .NET 4.0.30319.18408
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.20.0 (Business Edition)
Android SDK: C:\android-sdk
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: C:\Program Files\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

=== Xamarin Android Player ===

Version: 0.2.5
Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe

=== Build Information ===

Release ID: 508020005
Git revision: 541c06a4f6c95383333375d56fd6c23ce48cb916
Build date: 2015-03-20 06:08:35-04
Xamarin addins: 02510c4990dee3475c282b3182d588975a63ff07

=== Operating System ===

Windows 6.1.7601.65536
Comment 4 Matt Butler 2015-03-31 10:19:22 UTC
From the Nuget Author:

@aritchie
Owner

I took Acr.XamForms out of nuget months ago. I won't be updating or supporting it.
Comment 5 Matt Butler 2015-03-31 10:30:14 UTC
FYI - For anyone else that might come across this, just remove the Acr.XamForms nuget.  I'm also using Acr.XamForms.UserDialogs and Acr.XamForms.Mobile and it now compiles just fine!