0

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.

Federico Navarrete
  • 3,069
  • 5
  • 41
  • 76
Lukáš Neoproud
  • 872
  • 3
  • 10
  • 20

4 Answers4

1

The error suggests a problem with linking assemblies.

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

1

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.

Joy Rex
  • 608
  • 7
  • 32
0

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

its works on my system..

-2

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

slan
  • 1
  • 1