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


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


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.

Try to install old version package, for my .net core 3.1 project i have isntalled newtonsoftjson version 3.1.0. as shown in the below image.

After that make sure that you have installed NewtonsoftJson 3.1.10 version installed in your project. if your project version is low then same low version NuGet packages version.

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


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.

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.

Post a Comment

Previous Post Next Post