Search code examples
nuget-server

Server can't find packages after upgrade


Private nuget server can't find packages after upgrade

I had to update the nuget server to get it to accept packages that were failing to upload (apparently the package format changed in dotnet core or something). Now all the previously uploaded packages aren't showing up in nuget. I can see all of them on the server just sitting there in their directories. But they can't be found. New packages are ending up in the server's package directory rather than their own directories.

From prior experience I don't think just copying the packages into the packages directory is going to work.

Trying to actually upgrade the NuGet.Server package from v2.8.6 to v3.0.2 appears to work but in the end the package is still at v2.8.6.


Solution

  • Don't try to upgrade nuget.server projects. That way lies madness.

    Carry out the instructions like making a new one.

    1) Create a new empty Web Project; target framework is NET Framework 4.6

    2) Add NuGet.Server version 3.0.2

    3) Fix duplicate <compilation> tag in web.config

    4) Apply your API key to web.config and any other nuget configurations you have.

    5) Remove old project from installation directory; leaving behind only the Packages directory and optionally any static files you uploaded to the installation directory itself (I keep a copy of nuget.exe and local project icons there).

    6) Copy build output of new project to web installation directory.

    It starts working. I don't know what's up with upgrading but it ends up with a smashed web.config and who knows what else.