Reputation: 547
I have been trying to update NuGet packages in Visual Studio 2019 from both package manager consoles and the manage NuGet packages from the context options, but in both cases I get "Found invalid data while decoding." error.
I have to revert to Visual Studio 2017 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:
Upvotes: 32
Views: 18846
Reputation: 726
Visual Studio 2019
dotnet nuget locals all --clear
.bin
and obj
folders from the project folder.It is 100% working.
Upvotes: 71
Reputation: 875
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.
Upvotes: 3