问题
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
- Go to Tools > NuGet Package Manager > Package Manager Console.
- Type
dotnet nuget locals all --clear
. - Clean solution.
- 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