Wednesday, March 18, 2015

Android : Xamarin Linker removing reference to third party dll



When running my app in Release mode in Xamarin I get the following error with 'Link SDK assemblies only' on:



/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'System.IO.Ports.SerialPort' (defined in 'EftPay, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e6147cbb02cecb0d') from 'EftPay, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e6147cbb02cecb0d' could not be resolved. (mPOS)



I am using a third party library that uses the SerialPort reference in a class (as seen in the error), however I do not use that specific class. Is there a way I can tell the linker to not strip this reference?


Thanks for any help.


No comments:

Post a Comment