Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget not reinstalling packages

Tags:

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!

like image 719
burnt1ce Avatar asked May 05 '15 20:05

burnt1ce


People also ask

How do I force a NuGet package to reinstall?

Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.

How do I fix a missing NuGet package?

Quick solution for Visual Studio usersSelect the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.

How do I install NuGet packages missing?

Packages that don't install properly when you manually restore or run a build display error icons in Solution Explorer. Right-click the project, select Manage NuGet Packages, and use the NuGet Package Manager to uninstall and reinstall the affected packages.


1 Answers

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

like image 112
InteXX Avatar answered Sep 19 '22 13:09

InteXX