Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Android XamarinBuildAndroidAarRestore task could not be loaded from Xamarin.Build.Download

After upgrading all of my Xamarin Android nuget packages to the latest versions, I am now getting the following build error:

/Users/justintoth/.nuget/packages/xamarin.build.download/0.4.11/build/Xamarin.Build.Download.targets(116,3): error MSB4062: The "Xamarin.Build.Download.XamarinBuildAndroidAarRestore" task could not be loaded from the assembly /Users/justintoth/.nuget/packages/xamarin.build.download/0.4.11/build/Xamarin.Build.Download.dll. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

I've seen other references to this error and those devs were able to clean the solution, quit and restart Visual Studio for Mac, or reboot their computer. However, I've tried all three of those, manually deleting the bin / object folders, and even reinstalling Visual Studio for Mac and still am hitting this build error.

like image 222
Justin Avatar asked Dec 06 '22 08:12

Justin


1 Answers

I manually installed the latest Xamarin.Build nuget package and now it works. Not sure why it wasn't required before and now it is, but glad it was an easy fix...

like image 189
Justin Avatar answered Feb 08 '23 22:02

Justin