[Solved] Package restore failed. Rolling back package changes in visual studio 2019

Problem

I’m getting the below error when I trying to add the NewtonsoftJson package to asp.net web API core 3.1 project

Package restore failed. Rolling back package changes

Solution

It was an issue while installing the NewtonsoftJson package to my asp.net core API 3.1v project, so I tried to clear the cache of the All NuGet packages and restarted the visual studio.

After I cleared the cache, I was able to download the NuGet package API into my asp.net core project.

Summery

Clear of NuGet packages cache can also solve the problems when we are failing to install the new NuGet packages to our asp.net core projects.

Default image
Shivaraju M
Over 3+ years experience in IT industry, good knowledge in . Net-based Web applications, windows applications, web services, and SPAs. I have played multiple roles related to technical delivery in multiple domains while working on over 10+ technologies. I am currently focused on continuous improvement and agile project management.

Leave a Reply