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

  • Question

  • User126992 posted

    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

    Wednesday, November 15, 2017 7:51 PM

All replies

  • User65806 posted

    Restart Visual Studio

    Wednesday, November 15, 2017 8:11 PM
  • User165137 posted

    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.

    Wednesday, November 15, 2017 10:57 PM
  • User1823 posted

    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.

    Thursday, November 16, 2017 6:37 AM
  • User19820 posted

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

    Thursday, November 16, 2017 5:46 PM
  • User175615 posted

    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.

    Friday, November 17, 2017 11:22 AM
  • User215795 posted

    Restarting VS 2017 worked for me

    Friday, November 17, 2017 3:42 PM
  • User842 posted

    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.

    Saturday, November 18, 2017 8:18 PM
  • User73114 posted

    @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

    Sunday, November 19, 2017 11:19 AM
  • User4220 posted

    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.

    Monday, November 20, 2017 8:42 PM
  • User292885 posted

    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

    Wednesday, November 22, 2017 5:33 PM
  • User292885 posted

    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.

    Wednesday, November 22, 2017 5:51 PM
  • User351011 posted

    Restarting worked for me too. Thanks @RSH!

    Thursday, November 23, 2017 9:28 AM
  • User353223 posted

    @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.

    Thursday, November 23, 2017 11:54 AM
  • User292885 posted

    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?

    Thursday, November 23, 2017 5:40 PM
  • User358483 posted

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

    Saturday, November 25, 2017 5:22 PM
  • User56293 posted

    I am getting the same error with version 2.5.0.121934.

    Any ideas why this is happening?

    Wednesday, November 29, 2017 3:54 PM
  • User345894 posted

    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.

    Wednesday, November 29, 2017 4:43 PM
  • User358770 posted

    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

    Wednesday, November 29, 2017 5:59 PM
  • User61050 posted

    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

    Saturday, December 2, 2017 5:42 AM
  • User361894 posted

    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.

    Tuesday, December 5, 2017 6:14 AM
  • User353126 posted

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

    Tuesday, December 5, 2017 9:22 AM
  • User266899 posted

    @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!

    Tuesday, December 5, 2017 10:15 PM
  • User233605 posted

    My magic is: 1. Close Visual Studio 3. Delete bin/obj folders 4. Open Visual Studio and open solution 5. Do a clean a few times 6. Build :smile:

    Wednesday, December 6, 2017 12:05 PM
  • User294694 posted

    I downgrade to Xamarin.Forms 2.4.0.18342 and it worked

    Wednesday, December 6, 2017 3:37 PM
  • User313963 posted

    Resolved

    1. Take nu get manager of project solution
    2. Search for Xamarin.Forms
    3. Click on package Xamarin.Forms
    4. On right side confirm all projects used the same version.
    5. If its not update all
    6. Restart visual studio
    Thursday, December 7, 2017 11:25 AM
  • User150697 posted

    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

    Saturday, December 9, 2017 11:07 AM
  • User112311 posted

    @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.

    Saturday, December 9, 2017 12:12 PM
  • User101340 posted

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

    Tuesday, December 19, 2017 8:29 AM
  • User3325 posted

    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

    Tuesday, December 19, 2017 5:20 PM
  • User74 posted

    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. :)

    Tuesday, December 19, 2017 5:37 PM
  • User130 posted

    We're looking at it.

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

    Tuesday, December 19, 2017 6:18 PM
  • User3325 posted

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

    Tuesday, December 19, 2017 10:16 PM
  • User130 posted

    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.

    Tuesday, December 19, 2017 10:31 PM
  • User176749 posted

    @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

    Thursday, December 28, 2017 9:57 PM
  • User364365 posted

    @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?

    Saturday, January 6, 2018 6:43 AM
  • User330259 posted

    Unfortunately, same is happening here.

    Wednesday, January 10, 2018 2:38 PM
  • User317125 posted

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

    Friday, January 12, 2018 1:30 PM
  • User130 posted

    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.

    Tuesday, January 16, 2018 3:31 PM
  • User292226 posted

    Thanks for the update David.

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

    Friday, January 26, 2018 9:48 PM
  • User358325 posted

    No one is mentioning "Clear NuGet cache" as an option. I've bumped into the same issue. You should do this: - Close VS - Reopen VS without loading your solution - Go to Tools -> Options -> NuGet Package Manager -> General -> Clear All NuGet Cache(s) - Load you solution and Build.

    VS will redownload all required NuGets and you will get rid off your errors.

    Monday, January 29, 2018 3:36 PM
  • User365240 posted

    Error MSB4062: The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly

    Hello.

    I solved my problem by mounting the project (file-to-file) and compiling and was able to track the problem.

    A solution library required the Microsoft.Bcl.Build package in the project that reference (the App in my case).

    I just installed the package via nuget and everything ok ...

    I hope this helps.

    Monday, February 5, 2018 12:21 AM
  • User364538 posted

    ClaudiuCheles, you are my hero!

    I had this nagging error, though all my projects did (checked a dozen times) reference the same Xamarin.Forms version (2.5.0.280555), and though I did multiple full rebuilds, clears, VS restarts, reboots, remove all bin and objs, and whatever else came to my mind, including throwing things at walls and yelling words which in most civilized cultures would be considered sheer blasphemy.

    Clearing the cache resolved the issue.

    Thanx for sharing!

    Tuesday, February 27, 2018 10:39 PM
  • User261729 posted

    @RSH said: Restart Visual Studio

    Thank you, this worked for me..

    Wednesday, February 28, 2018 9:46 AM
  • User319002 posted

    This is what worked for me:

    1. Open the specific Xamarin.Forms.targets file (create a backup first!)
    2. Remove <UsingTask TaskName="Xamarin.Forms.Build.Tasks.GetTasksAbi" AssemblyFile="Xamarin.Forms.Build.Tasks.dll"/>
    3. Remove the node <PropertyGroup><_XFTargetsImportedAgain ... /><_XFTargetsImported ... /></PropertyGroup>
    4. Remove the node <Target Name="_ValidateXFTasks" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="'$(XFDisableTargetsValidation)' != 'True'">...</Target>

    You have to do this for every platform/architecture.

    Wednesday, February 28, 2018 12:32 PM
  • User44776 posted

    @ClaudiuCheles said:

    No one is mentioning "Clear NuGet cache" as an option. I've bumped into the same issue. You should do this: - Close VS - Reopen VS without loading your solution - Go to Tools -> Options -> NuGet Package Manager -> General -> Clear All NuGet Cache(s) - Load you solution and Build.

    VS will redownload all required NuGets and you will get rid off your errors.

    Worked for me. Thanks @ClaudiuCheles

    Tuesday, March 6, 2018 12:23 AM
  • User327165 posted

    @Slion said: 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.

    This worked for me.

    Wednesday, March 7, 2018 9:16 AM
  • User2422 posted

    @JoseEveraldoAraujo, this worked for me after adding Bcl.Build nuget THEN restarting VS for MAC and doing the usual clean and rebuild, thanks.

    Wednesday, March 7, 2018 8:28 PM
  • User266401 posted

    We have uploaded only Xamarin.Forms package to 2.5.xxx and now compile works

    Thursday, March 22, 2018 5:43 PM
  • User72126 posted

    Delete obj folder in all the platforms. Restart visual studio, clean and build.

    Friday, April 6, 2018 3:12 PM
  • User367814 posted

    None of this stuff works for me. I'm running VS on a Mac Version 7.4.2 build 10. I can't believe that "We" have to mess with the stuff ALL THE TIME! How do you expect Xamarin to ever be productive.

    This is an great example of why cross platform tools fail.

    Xcode and Android Studio for the win.

    Tuesday, April 24, 2018 3:11 PM
  • User367818 posted

    @ClaudiuCheles thanks, work for me: quick and dirty! :)

    Tuesday, April 24, 2018 3:36 PM
  • User361784 posted

    @RSH said: Restart Visual Studio

    Same here, worked for me.

    Tuesday, April 24, 2018 9:33 PM
  • User367861 posted

    I have updated both Android and IOS project to an equal version. That solved mine.

    Wednesday, April 25, 2018 7:45 AM
  • User359734 posted

    Usually restarting Visual Studio worked for me, but today it would deploy because of this error and restarting didn't help. I fixed it by right clicking the solution and selecting restore nuget packages.

    Wednesday, April 25, 2018 9:33 AM
  • User362836 posted

    I was stuck with the same error . Downgrading the Xamarin.Forms version to 2.4.0.91020 and restarting the Visual Studio solved the issue for me . :-)

    Tuesday, May 1, 2018 5:48 AM
  • User330867 posted

    All I had to do was restarting the Visual Studio.. strange

    Friday, May 4, 2018 9:35 AM
  • User326071 posted

    @"RahulRaj.2336" said: Resolved

    1. Take nu get manager of project solution
    2. Search for Xamarin.Forms
    3. Click on package Xamarin.Forms
    4. On right side confirm all projects used the same version.
    5. If its not update all
    6. Restart visual studio

    Thankyou so much Rahul. This was the solution in my case...

    Sunday, May 6, 2018 8:31 AM
  • User191 posted

    @ClaudiuCheles said: No one is mentioning "Clear NuGet cache" as an option. I've bumped into the same issue. You should do this: - Close VS - Reopen VS without loading your solution - Go to Tools -> Options -> NuGet Package Manager -> General -> Clear All NuGet Cache(s) - Load you solution and Build.

    VS will redownload all required NuGets and you will get rid off your errors.

    My scenario is bit different.

    I first created my Xamarin.Forms project in VS4Mac (Xamarin.Forms v3.0.0.446417) and everything work great and compiled without error.

    Next I open the project in VS2017 on Win10 box, and having the reported error.

    By doing @ClaudiuCheles suggestion, and it resolved the .NetStandard 2.0 library problem. But remain facing the same error.

    Next, I found this https://stackoverflow.com/questions/50249343/error-msb4062-the-xamarin-forms-build-tasks-gettasksabi-task-could-not-be-loa and I installed .NET Framework 4.7.1, finally it resolved the problem.

    Hope this will help someone whose have tried many suggested solution and remain no luck.

    Cheers,

    CT

    Friday, May 11, 2018 4:25 AM
  • User216512 posted

    I got into this mess when trying to upgrade to 3.0.0.482510! I think I tried all of the fixes in this thread, and nothing has worked for me. Reverting my Xamarin Forms package back to it's previous version didn't even work. I've checked out a fresh Workspace with my project. Dreading ever trying to upgrade Forms again.

    Wednesday, May 23, 2018 3:02 PM
  • User90808 posted

    I ran into the issue yesterday for the first time. I upgraded my Forms package from 2.5.0.x to 2.5.1.x and the issue went away. Didn't wipe .vs or clear NuGet. I did do a Clean Solution, but that's normally par for the course when updating packages or having build issues. Running VS 15.7.2.

    I did follow the Xamarin team's advice and make sure all Xamarin.Forms packages are the same version.

    Friday, May 25, 2018 11:39 AM
  • User366473 posted

    Got the same problem yesterday as well all of the above fixes were usesless to me only thing that fixed it was to run the visual studio installler and repair my installation

    Friday, May 25, 2018 11:45 AM
  • User312313 posted

    Restart VS and then Clean & Build of solution worked for me

    Wednesday, May 30, 2018 4:41 AM
  • User369473 posted

    I found the solution guys just install .NET Framework 4.7.1

    Thursday, June 7, 2018 8:27 PM
  • User369759 posted

    I was having this problem on iOS after updating Xamarin.Forms. I was able to fix it by switching Project->Active Runtime to Mono 5.10.1.57 in Visual Studio

    Wednesday, June 13, 2018 1:00 PM
  • User185752 posted

    Updated .net Framework 4.7.1. Works for me now.

    Friday, June 22, 2018 9:32 PM
  • User185752 posted

    Updated .net Framework 4.7.1. Works for me now.

    Friday, June 22, 2018 9:32 PM
  • User9959 posted

    New project with XF 3.1.0.583944 and I get this same error; "The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly..." If something is missing can't it check and tell us what we need to install or update before creating a new broken solution?

    I have the latest update of Visual Studio 2017, why is Xamarin not just able to work with this? How many cryptic messages do I have to trace to find yet another dependency that needs to be installed?

    Seriously, every time I come back to give Xamarin another try, ALL of my available time is spent trying to get a working development environment, until I have to drop it and go back to real work.

    Monday, June 25, 2018 10:13 PM
  • User9959 posted

    @"ChaitanyaInamdar.6367" said: Updated .net Framework 4.7.1. Works for me now.

    This doesn't appear to be an option in the Visual Studio installer. If I install Xamarin from the VS installer, why doesn't it install a version that is ready to work with this development environment? What a train wreck of a tool.

    Monday, June 25, 2018 10:18 PM
  • User369602 posted

    @"RahulRaj.2336" said: Resolved

    1. Take nu get manager of project solution
    2. Search for Xamarin.Forms
    3. Click on package Xamarin.Forms
    4. On right side confirm all projects used the same version.
    5. If its not update all
    6. Restart visual studio

    This helped on my case :smile:

    Tuesday, June 26, 2018 5:01 AM
  • User328763 posted

    What an absolute mare! All was fine until I upgraded to v3.1.0.6xxxxx, then the dreaded error

    Xamarin.Forms.Build.Tasks.GetTasksAbi task could not be loaded
    

    When in this state I cannot even clean the solution from the IDE (gives same error). Xamarin forms version IS the same across all projects so it's not that problem, my nuget doesn't have any options any option to clear the cache so I couldn't try that. I uninstalled Xmarin.forms, it gave an error:

    The package at xxxxxxxxxxxxxx\Xamarin.Forms.3.1.0.637273 failed to uninstall. Restart Visual Studio to finish the process
    

    I restart VS but then it hang whens loading the iOS project during startup! I kill the ide process manually, then with Xamarin.forms still uninstalled and VS shutdown I did this:

    • Deleted the .vs folder
    • Deleted bin + obj folders for all projects
    • Deleted Xamarin.forms folder in packages
    • Started VS

    At last my project loads, I am again able to 'clean' without error (but I still don't have Xamarin forms installed). In the nugest manager, install 3.1.0.6xxxxx into all projects, install goes through fine but again the solution build + clean fails with the original GetTasksAbi error ie. I am not able to install v3.6.1. (VS 2015 on Windows)

    I go through the whole process as described above to remove v3.1.0, then install v2.5.1 and all is working again.

    I hope this helps anyone else in the same predicament and that the Xamarin team can advise regarding this seemingly ongoing issue?

    Monday, July 16, 2018 7:55 AM
  • User315294 posted

    Clearing the cache got this fixed.

    Friday, July 20, 2018 9:08 AM
  • User294546 posted

    I just ran into this issue, and can confirm that upgrading the Visual Studio on my build agent to have .Net Framework 4.7.1 fixed it. So add that to the list of potential solutions as well.

    Monday, July 23, 2018 7:17 PM
  • User336809 posted

    I just decided today to give Xamarin.Forms another try. So I created new Xamarin's template solution (blank app) using VS 2017. I couldn't make it working until I installed .net framework 4.7.1. Other workarounds just didn't work.

    So yes, it builds now, but... OMG!!!

    Sunday, July 29, 2018 10:20 AM
  • User306403 posted

    @DuncanMcIntyre said: @ClaudiuCheles said:

    No one is mentioning "Clear NuGet cache" as an option. I've bumped into the same issue. You should do this: - Close VS - Reopen VS without loading your solution - Go to Tools -> Options -> NuGet Package Manager -> General -> Clear All NuGet Cache(s) - Load you solution and Build.

    VS will redownload all required NuGets and you will get rid off your errors.

    Worked for me. Thanks @ClaudiuCheles

    Work like a charm, thank you

    Thursday, August 16, 2018 3:37 PM
  • User368052 posted

    hey, how to clear nu get cache on Mac ?

    Friday, August 17, 2018 7:23 AM
  • User360498 posted

    I have faced the same issue recently, the simplest solution is to install .net framework 4.7.1, that's it. It's because 4.7.1 is required for netstandard2!

    Sunday, November 25, 2018 4:53 PM
  • User28058 posted

    I often encounter this problem. In many cases, CClaudiu_MSFT's solution works fine. Thxs!

    Friday, January 11, 2019 7:29 AM
  • User323696 posted

    Getting more than a bit irritated with people posting the same suggestion that has been mentioned about a million times previously. If what worked for you is something like restarting VS, clearing caches, upgrading or downgrading Xamarin.Forms, or whatever else that's been suggested previously, maybe like the original comment instead of posting your own...

    For me, I noticed that my Droid project was referencing Xamarin.Forms v2.5.x whereas all my other projects in the solution were referencing v2.4.x. As has been mentioned previously, it needs to be the same version.

    However, while the Droid project does not build for me on VS for Mac 7.7.2 (build 21), strangely enough, it works fine for me with VS for Mac 7.5.2 (build 40). And yes, I've already tried all the clearing suggestions. Maybe worth looking into what's changed between these two version of VS for Mac @DavidOrtinau .

    Thursday, January 17, 2019 1:39 AM