ERROR WITH LATEST NUGET v2.5.0.77 "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded

DonBoxDonBox USMember ✭✭
edited November 2017 in Xamarin.Forms

I just got latest stable 2.5.0.77107 and I can't compile anymore

[myUser]\packages\xamarin.forms\2.5.0.77107\build\netstandard1.0\Xamarin.Forms.targets(55,3): error MSB4062: The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly [myUser]\.nuget\packages\xamarin.forms\2.5.0.77107\build\netstandard1.0\Xamarin.Forms.Build.Tasks.dll.  Confirm that the <UsingTask> 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 replaced my user path with [myUser]

it looks like this bug exists since October in the pre-release:

https://bugzilla.xamarin.com/show_bug.cgi?id=60293

«1

Answers

  • CShipleyCShipley USMember ✭✭
    edited November 2017

    I'm running into this too. Restarting visual Studio doesn't work. Blowing away .vs, temp, clean all doesn't work either. Downgrading XF back to 2.4.0 seems to work.

  • BradCunninghamBradCunningham USBeta, Developer Group Leader ✭✭

    I am getting this a lot the past few days since upgrading too. Doing a Clean at the solution level then rebuilding seems to make it go away for me. I am seeing it about once ever 5 to 10 builds though and it is annoying to have to keep cleaning.

  • AndrewMobileAndrewMobile USMember ✭✭✭✭
    edited November 2017

    With latest v2.5.0.77107 I can't get rid of the error at all.... Any solutions?

  • Also having the same issue since updating to 2.5, issue only seems to appear for me when I build UITests project which references my iOS project though.

  • Restarting VS 2017 worked for me

  • ThomasHagstrmThomasHagstrm SEMember ✭✭

    @IvanHarris said:
    The issue seems to be with Xamarin.Forms latest (2.5.XXXXXX). I downgraded my PCL, and target projects (Android, iOS, and UWP) to Xamarin.Forms 2.4.0.91020. This worked. Restarting Visual Studio, did not work for me.

    Yep, I had to downgrade as well. 2.5.* is not UWP compatible it seems

  • NickRandolphNickRandolph AUUniversity ✭✭

    I ran into this error with 2.5.0.91635 - I just did a manual Rebuild of all libraries and it seemed to fix the issue. I don't think it's a compatibility with UWP issue as we've seen this with Android builds too.

  • GerryHGerryH USMember ✭✭✭
    edited November 2017

    I get the same error.

    After upgrading Xamarin Forms to the latest, 2.5.0.91635, I tried to restart VS. VS hangs trying to open the project. I have to clone from git to be able to access the project again. Unbelievable.

    I am stuck at Xamarin.Forms version 2.4.0.91020

  • GerryHGerryH USMember ✭✭✭

    Found this: https://bugzilla.xamarin.com/show_bug.cgi?id=60293, see Comment 11, does that help anyone? Not sure if that refers to a xamarin forms bug or what.

  • SgtJukkerSgtJukker USMember ✭✭

    Restarting worked for me too. Thanks @RSH!

  • razishrazish DEMember ✭✭

    @IvanHarris said:
    The issue seems to be with Xamarin.Forms latest (2.5.XXXXXX). I downgraded my PCL, and target projects (Android, iOS, and UWP) to Xamarin.Forms 2.4.0.91020. This worked. Restarting Visual Studio, did not work for me.

    Thanks, That helped.

  • GerryHGerryH USMember ✭✭✭
    edited November 2017

    It turned out after trying to upgrade Xamarin.Forms (2.4.0.91020) Visual Studio professional could no longer open my solution (program would hang). I got the trial version of VS Enterprise, which was able to open the solution. Programming is fun!

    What exactly is the point of 2.5.0.xxxx if no one can get their programs to build/run with it?

  • I just updated to the 2.5.0.91635 and had the same issue.
    Rollback to 2.5.0.77107 resolve it for me.

  • PaulDistonPaulDiston USUniversity ✭✭✭✭

    I am getting the same error with version 2.5.0.121934.

    Any ideas why this is happening?

  • DenisStarikovDenisStarikov USMember
    edited November 2017

    This is what worked for me:

    First I've opened Xamarin.Forms.targets file in text editor and removed the GetTasksAbi tag. Tried to build again. This time I've got "Xamarin.Forms tasks do not match targets. Please ensure that all projects reference the same version of Xamarin.Forms, and if the error persists, please restart the IDE." error. I then fixed solution so that all projects would reference same version of Xamarin.Forms. And this time build completed successfully.

  • I can confirm that restarting visual studio did not work for me either. I have this issue with Xamarin Forms version 2.5.0.91635 and 2.5.0.77107

  • PaulReadPaulRead GBMember ✭✭

    Same issue with GetTasksAbi, doing a VS2017 restart and sometimes it crashes, doing a clean solution and sometimes it hangs.

    @GerryH said:
    I get the same error.
    Unbelievable.

    "unbelievable" is also about the best none rude description to describe my thoughts

  • SlionSlion DEMember

    That seems to be any issue only if projects in your solution are using different version of Xamarin.Forms.
    At least for me making sure all projects are referencing the same Xamarin.Forms version and restarting Visual Studio fixed it.

    In your 'Solution Explorer' right click on your solution node and select 'Manage NuGet Packages for solution...'.
    Select the 'Consolidate' tab and click on the Xamarin.Forms NuGet package, notice projects are referencing different versions of Xamarin.Forms. Click on install to solve the problem.

  • EugeneKibaEugeneKiba USMember

    Try these steps:
    1. Unload project from the solution
    2. Restart visual studio and open solution
    3. Reload project
    4. Rebuild

  • @EugeneKiba said:
    Try these steps:
    1. Unload project from the solution
    2. Restart visual studio and open solution
    3. Reload project
    4. Rebuild

    Cheers for that, seems to work finally!

  • PioTofanelliPioTofanelli USMember ✭✭

    I downgrade to Xamarin.Forms 2.4.0.18342 and it worked

  • BenoistLUGNIERBenoistLUGNIER FRMember ✭✭

    It seems that all project must have the same version of nuget xamarin.forms.
    For me, I tried to build uwp project but android project don't have the right version of XF.

    I upgrde android project and uwp build like a charm.

    Then thanks to RahulRaj.2336

  • IrrealIrreal RSUniversity ✭✭✭
    edited December 2017

    @GerryH said:
    I get the same error.

    After upgrading Xamarin Forms to the latest, 2.5.0.91635, I tried to restart VS. VS hangs trying to open the project. I have to clone from git to be able to access the project again. Unbelievable.

    I am stuck at Xamarin.Forms version 2.4.0.91020

    You only need to delete the hidden .vs folder and the .csproj.user files to get it to open without hanging again.
    I'm not saying it's a great solution, and I'd love for VS not to hang ever, but claiming you have to clone from git again is always due to lack of detailed knowledge on how the tools you are using every day actually work.

  • CaioshinnCaioshinn USMember ✭✭

    same problem for me, solved deleting the .vs folder and restarting VS

  • MatthewSnyderMatthewSnyder USMember ✭✭
    edited December 2017

    Same issue here. Keeps recurring every couple builds. This needs to be fixed like NOW. I'm starting to have flashbacks of the Xamarin 1.0 days where things would just mysteriously stop working all the time. :-) :-0

  • JohnHairJohnHair GBMember ✭✭✭✭✭

    I had this issue and found that a new project I had just created was referencing a different version of XF to the rest of my projects. Uninstalled the XF nuget from that project, installed the correct XF nuget version, and all resolved in less than 5 mins. :)

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    We're looking at it.

    Definitely make sure all projects reference the same version of the NuGets.

  • MatthewSnyderMatthewSnyder USMember ✭✭

    @DavidOrtinau Thanks! Agreed, no amount of cleaning an restarting VS will fix it if they're not all on the same version of Forms.

  • batmacibatmaci DEMember ✭✭✭✭✭

    @DavidOrtinau said:
    We're looking at it.

    Definitely make sure all projects reference the same version of the NuGets.

    every single build having this problem. i am night builds and every time i upgrade this problem re-occurs. super annoying

  • @DavidOrtinau said:
    Ok, just had an in-depth conversation about this issue. I'll do my best to explain.

    Here's what this build task is for:
    It provides better validation and error messages when you are building to make sure you have unified Xamarin.Forms versions and can avoid unexpected build issues as a result. Sounds good, right? It will be as new versions of Xamarin.Forms continue to roll out with this build task.

    Here's why this error is being hit now:
    The build process first loads one version of Xamarin.Forms build tasks and then the 2.5.0 version with this method, and since there's a mismatch the method is not found. The non-2.5.0 version may still be referenced in a project that wasn't updated to a matching version, or it may be held in memory by the IDE or msbuild.

    So, the scorched earth way to make sure you can build should look like this:
    - Unify all Xamarin.Forms versions in your solution
    - Close Visual Studio
    - Make sure devenv.exe and msbuild.exe are gone from running processes
    - Delete .vs and bin/obj folders (aka obliterate)
    - Reopen the solution and do a full rebuild

    The need to do a reboot when updating NuGets especially is something I very much want to see once and for all resolved, and I'm gathering scenarios such as this for the IDE and build teams to address.

    I tried, I practiced these steps multiple times and no luck.
    Its frustrating and no productivity. Do you have any ETA for this issue to be resolved?

  • NunoCoimbra.1331NunoCoimbra.1331 USMember ✭✭

    Unfortunately, same is happening here.

  • CamelCaseMasterCamelCaseMaster USMember ✭✭

    I'm having the same issue; trying @DavidOrtinau's solution

  • DavidOrtinauDavidOrtinau USForum Administrator, Xamarin Team, Insider, University Xamurai

    We are considering making this a build warning instead of an error. I have situations where I know I want different versions across my solution while I'm evaluating versions, or when I've unloaded a project on an old version.

    However, those steps have 100% always worked on OS X to clear the build error. Please make sure you understand and execute each step. I usually miss one project where I didn't unify the version. On my end, I usually just need to unify the versions and restart VS Mac.

    If you're still getting this after, please share your IDE details and log output (accessed under the Help menu) with us to see if we can figure out what's going on.

  • PhocionPhocion USMember ✭✭

    Thanks for the update David.

    For me ensuring all Xamarin.Forms versions are the same, and restarting VS worked. (see RahulRaj above.

«1
Sign In or Register to comment.