The "ResolveLibraryProjectImports" task failed unexpectedly

edit your android project file (csproj) like below

enter image description here

this issue topic may guide https://github.com/xamarin/AndroidSupportComponents/issues/51


I've literally just had this with a brand new Xamarin.Forms application in Visual Studio 2017.

The root cause appears to be that I let VS2017 create the project in it's default location 'C:\Users\Dave\Documents\Visual Studio 2017\Projects' and this has resulted in one of more files now having a path which it too long.

I moved the solution to the root of my D drive and it builds without any problem.


Your issue is most likely linked to this post on the Xamarin forums, and this bugzilla entry. Without a reproducible sample, all I can advise you try is:

  • Updating Xamarin for Visual Studio, Xamarin.Android, and Xamarin.iOS to the latest stable versions
  • Cleaning and rebuilding
  • Deleting all of the bin and obj folders from your project directories
  • Restarting Visual Studio/your PC

Failing all of that, there's not likely to be anyone who can help you without a reproducible sample and potentially your Xamarin logs.