Source unreachable when using the NuGet Package Manager Console

后端 未结 13 1907
面向向阳花
面向向阳花 2020-12-12 15:11

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

相关标签:
13条回答
  • 2020-12-12 15:43

    I had to provide the comman along with the full url as Install-Package MySql.Data.Entity -Version 6.9.8 -Source http://www.nuget.org/api/v2

    0 讨论(0)
  • 2020-12-12 15:45

    You can change NuGet source from UI as well. Just change NuGet source to older version and it should work fine.

    enter image description here

    There seems to be still few bugs in VS 2015 related to api.nuget.org (v3).

    0 讨论(0)
  • 2020-12-12 15:51

    I had the same issue with the same message. But the reason of my problem was lost connection to TFS. My TFS server was hosted in other network and I used VPN for access to it. When I tried to install the package without established connection to TFS (VPN was turned off) I got the same problem.

    Be aware of this TFS behavior.

    0 讨论(0)
  • 2020-12-12 15:52

    I had to copy the default NuGet source in Visual Studio's options. With the copied source, I changed the URL from https to http. This resolved the problem for me.

    Credit for this suggestion belongs here: https://nuget.codeplex.com/discussions/561075#PostDetailsCell_1354351, to "jpharris4".

    0 讨论(0)
  • 2020-12-12 15:56

    This is worked for me in VS 2015 prof: Tools -> Options -> Nuget Package Manager -> Package Sources

    1. Press Add button
    2. Edit in Name label: nuget.org
    3. Edit in Source label: https://www.nuget.org/api/v2/
    4. Press OK

    Hope it helps ;)

    0 讨论(0)
  • Happens because you work offline mode, when you reconnect the network will need to log off and log back. Package manager will smoothly re-initialize.

    0 讨论(0)
提交回复
热议问题