Linking assemblies failed with BugSense for Xamarin.Android

1.4k views Asked by At

I'm trying to integrate BugSense into my Xamarin Android project.

I followed this guide and when I built my project I got LinkAssemblies error:

Error 1 error MSB4018: The "LinkAssemblies" task failed unexpectedly. 0 0 Error 2 error MSB4018: Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Android.Views.SurfaceOrientation Android.Views.Display::get_Rotation()' (defined in 'BugSense.Xamarin.Android, Version=3.6.0.2, Culture=neutral, PublicKeyToken=null') from 'BugSense.Xamarin.Android, Version=3.6.0.2, Culture=neutral, PublicKeyToken=null' could not be resolved. 0 0

I tried to add BugSense library via Package Manager Console, then by adding DLL to References and then via NuGet. I built it with Visual Studio 2012 and also with Xamarin Studio but everything failed the same.

4

There are 4 answers

0
BlackbirdSLO On BEST ANSWER

The error suggests a problem with linking assemblies.

Try setting Linking to None in Project properties -> Android Options -> Configuration properties.

0
slan On

In Release Mode for all Projects set project prop => advances => Debug Info = Node

0
Usman Mir On

add Api 21 and set its targeted Framework 5.0 and restart your Xamarin ..

its works on my system..

0
Joy Rex On

Xamarin.Android applications use a linker in order to reduce the size of the application.The default value is SdkOnly

  • None: No linking will be attempted.
  • SdkOnly: Linking will be performed on the base class libraries only, not user's assemblies.
  • Full: Linking will be performed on base class libraries and user assemblies. For more details refer here.. Note: if you are facing an issue with linking such as

LinkAssemblies" task failed unexpectedly. or

"GetAdditionalResourcesFromAssemblies" task failed unexpectedly. System.IO.FileNotFoundException: . Perhaps it doesn't exist in the Mono for Android profile?

then recheck your xamarin.Android project settings and set the below tag,

<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>

Hope it will be helpful.