Kef Schecter
Kef Schecter

Reputation: 232

How can I validate my NuGet packages to be sure they're not corrupt?

I was installing packages with NuGet in Visual Studio 2017 and Visual Studio froze on me, and I had to end-task it. When I started it up again and tried adding the packages to the solution again, it copied the packages I'd downloaded from the cache, including the one it was working on when it froze. I'm not 100% sure it had fully downloaded. How can I verify the integrity of the packages in the cache?

Upvotes: 1

Views: 647

Answers (1)

Ian Mercer
Ian Mercer

Reputation: 39277

Easiest way to be sure everything is in the right state would be to delete the cache and then from the package manager console run Update-Package -reinstall to reinstall all packages in your solution.

But it's unlikely anything would be in a partial state given the nature of Nuget files (based on ZIP) so this is probably not necessary.

Upvotes: 1

Related Questions