burnt1ce
burnt1ce

Reputation: 14897

Nuget not reinstalling packages

I have modified the target .net framework to use 4.5 from 4.0. I got a message from nuget that packages need to re-installed so ran Update-Package -Reinstall -ProjectName https://localhost/SomeWebProject/. As nuget was executing, it spitted out yellow warning signs that looked like this:

Skipped reinstalling package 'NLog 3.1.0.0' in project 'SomeWebProject' because the package does not exist in the package source.

Why aren't my packages being reinstalled? I went into my packages folder and verified NLog 3.1.0.0 exist!

Upvotes: 21

Views: 4211

Answers (2)

InteXX
InteXX

Reputation: 6367

Turns out the solution is hiding in plain sight.

All we have to do is set the Package Source in the Package Manager Console window. (Credits to Matt Ward for pointing it out.)

enter image description here

Upvotes: 44

TechManiac
TechManiac

Reputation: 224

Or you may run the following NuGet Package Management command:

'Update-Package -reinstall'

This command will reinstall all your solutions NuGet packages without updating the version(s) of existing packages.

Upvotes: 0

Related Questions