Unable to restore / remove / update a NuGet package because the mentioned version is no longer available

前端 未结 5 515
野性不改
野性不改 2021-02-06 21:11

I\'m trying to give the SignalR Sample a test drive but it seems it references an old version of SignalR which is no longer available. The actual problem is that NuGet cannot re

相关标签:
5条回答
  • 2021-02-06 21:46

    In my case, I'd restarted visual studio. Then I'd removed nuget package entry from package.config.

    After that I was able to restore the dependency.

    0 讨论(0)
  • 2021-02-06 21:55

    Mentioned by @ferarias in a comment - if you are using nuget.exe, try updating it or downloading the latest version.

    For me, upgrading from v4.4.1 to v4.6.2 was enough to fix the Some NuGet packages are missing error.

    0 讨论(0)
  • 2021-02-06 22:01

    You can manually remove the dependency by:

    1. Close Visual Studio (not a hard requirement, but helpful)
    2. In text editor, remove dependency from all packages.config files
    3. Remove package from packages/ directory
    4. In text editor, remove all references to package from all .csproj files
    5. Start Visual Studio
    6. Reinstall package through NuGet
    0 讨论(0)
  • 2021-02-06 22:01

    There's an easier solution, if you know the versions that currently exist in the feed. This solution can fix every package in every project.

    • Open packages.config file (if you have more than one project, do this for every packages.config file)
    • Update versions to the correct ones (i.e. change the version attribute)
    • In the Package Manager Console, type Update-Package -Reinstall

    Hope it helps

    0 讨论(0)
  • 2021-02-06 22:10

    What works for me is:

    1. Go to the packages.config file,

    2. Find "... id="Microsoft.AspNet.SignalR.Client" version="" targetFramework="net45"..."

    3. Change to an existing version, say "2.2.0".

    4. Save.

    5. Go to Nuget, and update to the latest.

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