We are moving our package management from manually updating files to NuGet. I am trying to install older versions of packages to match the one we already have in source cont
In my Package Manager Console i could not see any sources
Going to: Tools -> Options -> Nuget Package Manager -> Package Sources
I found the sources. Unchecking them, and them checking them back made the re-appear in my Package Manager Console
enter image description hereMay be yours office/home firewall blocking nuget.org so try to connect different internet network for example from your mobile or wifi .I was able to solve through this method.
In my case the cause was that the package had an agreement. Through the UI - "Manage NuGet Packages" dialog you have the option to accept and continue.
The Package Manager Console in VS 2013 seems to have an issue with this. As others have said restarting VS 2013 might resolve it for the console.
Even though my Package Source was set to nuget.org in Package Manager Console, explicitly adding the -Source nuget.org
argument fixed this for me.
So an example of use would be:
Install-Package Akka.net -Source nuget.org
Akka.net being your package that you want to install, its just an example here.
None of these solutions worked for me with VS2013. Yes I know it's the year 2020. In the end I downloaded the nuget package to a local folder, added the folder to the nuget settings, and then voila!, was able to install the package.
I'm not sure what can cause your issue, but there is indeed a way to override package sources on a per-solution basis, but only if you've enabled NuGet Package Restore on the given solution.
Once a solution has enabled NuGet Package Restore a folder called ".nuget" gets added to the solution. Under this will be a file called "NuGet.targets" that has an ItemGroup whose Condition is " '$(PackageSources)' == '' " like the one you'll see in the attached image.
If the ItemGroup is empty (or completely commented out, as in the illustration) then the solution will use a specific file that should be the same as the sources listed under TOOLS >> OPTIONS. But if you uncomment or add PackageSource items to that ItemGroup the solution will search the package sources listed and ONLY the ones listed.