Error MSB4018: The "LinkAssemblies" task failed unexpectedly

neeraj_goelneeraj_goel USMember ✭✭

I have updated my Visual Studio to 8.2.2 after that when i build my project it gives error "Error MSB4018: The "LinkAssemblies" task failed unexpectedly".
I have google it and found that if i set LinkAssembley to Don't Link in Android configuration then project run well but it increase my Android build size.
My project is having Xamarin.Forms version 3.1. Please provide a solution for it.

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    @neeraj_goel
    You can set the linker option to Sdk and User Assemblies, If it is worked.
    If it not worked, Please Set the Compile using Android version: (Target Framework) to the latest installed platform. and set the Minimum Android version to API level 19 or higher, and the Target Android version to the latest installed platform you chose Target Framework.
    You can refer to this link.
    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/troubleshooting/questions/android-linkassemblies-error

  • neeraj_goelneeraj_goel USMember ✭✭

    @LeonLu
    I have already try the same.

    Compile Version is Android 9.0(Pie)
    Minimum Android Version is Android 7.0(API Level 24)
    Target Android Version is Android 9.0(API Level 28)

    All Component of API Level 24 & 28 is installed in my system but still i am facing same issue.
    If you have any other workaround than let me know.

    Thanks

  • capitolcapitol Member ✭✭

    I had this start randomly upon an update too. My workaround has been to "Rebuild" my forms project every time.

    It will work for a while until i get the LinkAssemblies message again, then just rebuild and repeat.

  • neeraj_goelneeraj_goel USMember ✭✭

    @capitol
    I have tried several time to rebuild my project again and again also my other team team member trying same but it never build. Always give same LinkAssemblies error.
    Also i try to build PCL and Native project individually but it .Droid project never build.
    Any other workaround will be helpful.

    Thanks

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    @neeraj_goel Please Ensure Xamarin.Forms is the same version in every project (.Net Standard, Android, iOS, etc)

  • neeraj_goelneeraj_goel USMember ✭✭

    @LeonLu
    Yes, i am having same version in PCL, Droid, iOS project.
    For testing purpose i have also updated my Xamarin.Form version to 4.1.0673156 in PCL, Droid, iOS project but still facing same problem.

  • batmacibatmaci DEMember ✭✭✭✭✭
Sign In or Register to comment.