Reinstall nuget packages in project – command

Ever been in a situation where you wanted to have all nuget packages of a project to be kind of “refreshed”?

I had the other day, I upgraded a project from .NET 3.5 to .NET 4.0 and therefore needed to get the nuget packages for the particular .NET version. I didn’t wanted to reinstall all the packages manually because there were actually a lot.

Therefore I Googled with Bing and found the following command, which did the trick.

Update-Package –reinstall -project MySuperProject.Web