LinkedIn

Thursday, 7 April 2016

Fix already installed nuget packages

Hello,

Sometimes I create a branch and for some reason 1 or 2 projects packages and hence Dlls are wrong. I even try using "Restore Nuget Packages" at solution level from the context menu but this doesn't always fix it.

The best fix I have found is this:
Update-Package PackageName -ProjectName MyProject -reinstall

So if you have Entity Framework 6.1.2 installed and it got broken in a branch then you could run:


Update-Package EntityFramework -ProjectName MyProject -reinstall

And it will reinstall EF 6.1.2

That is all,

thanks
Russ