Found invalid data while decoding error updating nuget packages

℡╲_俬逩灬. 提交于 2020-01-04 02:55:12

问题


I have been trying to update nuget packages in vs2019 from both package manager console and the manage nuget packages from the context options but in both case i get "Found invalid data while decoding." error. I have to revert to vs2017 to update. Is there a way to deal with this or do I have to contend with this switching for now?

The error outputs are as below for both scenarios


回答1:


I had to log in and comment on this. Almost blew my head off fixing this. VS2019

  1. Go to Tools > NuGet Package Manager > Package Manager Console.
  2. Type dotnet nuget locals all --clear.
  3. Clean solution.
  4. Delete bin and obj folder from folder project.

100% Working.




回答2:


Deleting the obj and bin folders in each project in my solution, then reopening Visual Studio 2019 to trigger automatic package download worked for me. I don't think you need to remove bin as well but I was going crazy at that point.



来源:https://stackoverflow.com/questions/55807079/found-invalid-data-while-decoding-error-updating-nuget-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!