0
votes

I'm getting an error when trying to build app with Link SDK Assemblies Only(everything works on Don't Link)

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'System.Void Xamarin.Forms.Element::set_AutomationId(System.String)' (defined in 'ZXing.Net.Mobile.Forms, Version=2.1.47.0, Culture=neutral, PublicKeyToken=null') from 'ZXing.Net.Mobile.Forms, Version=2.1.47.0, Culture=neutral, PublicKeyToken=null' could not be resolved. (FleetApp.Droid)

I'm trying to add assemblies that cause the issue in ignore list:

enter image description here

But I can't get the error disappear. Is this correct way to do it? or am I adding wrong assemblies to ignore list?

P.S. Also tried adding them without braces.

1
Could you share some steps to reproduce this problem?Elvis Xia - MSFT
Create Xamarin.Forms app, downgrade Forms package to 2.0.5782, install new version of ZXing.Net.Mobile.Forms. That should be enougharsena

1 Answers

0
votes

This is an issue of having an old version of Xamarin.Forms. You need to use the latest stable version of Xamarin.Forms as the dependency of ZXing.Net.Mobile.Forms does not strictly require you to have a version of Xamarin.Forms that doesn't include AutomationId.

Thus you would need >= Xamarin.Forms 2.2.0:

https://developer.xamarin.com/releases/xamarin-forms/xamarin-forms-2.2/2.2.0-stable/#AutomationId_Support

After you do that, you can remove all the Ignore Assemblies as you no longer would need to ignore assemblies.