Restoring NuGet Package

There are plenty of ways to restore missing nuget packages. In many cases you might just want to copy packages from one project to another. The easiest way to copy packages from 1 project to another is by using the below command:

Update-Package -Reinstall -ProjectName <ProjectName>

where <ProjectName> is the name of your project.

Second, if you want to restore packages in the entire solution is, you have to omit -ProjectName in the above command like so:

Update-Package -Reinstall

And that’s it, as simple as that. I have encountered this many times already and I have to take note of the command by making a post about it. Through this I can just simply look into my blog and wallaaaahhh, there it is.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: