NuGet package filename mismatch between gallery and server
Just noticed this one when setting up a corporate NuGet server implementation based on NuGet.Server.dll.
NuGet (both commandline, vs extensions and package explorer) uses the following package filename convention:
$(packageID).$(version).nupkg
However, when you try to download a package (physically, e.g. for local/offline/archiving reasons), you'll notice there is a mismatch.
Try this one for instance: http://packages.nuget.org/v1/Package/Download/Ninject/2.2.0.0
Go ahead and try any other package/version combination available on the gallery.
Found it?
This is what you'll get:
$(packageID)-$(version).nupkg
If you want to use these packages to quickly test your own NuGet server implementation (which is what I did), you'll get a 404 Not Found.
It took me a while to figure out what was wrong, because I was still able to see the package appear in the feed (you know you're probably wrong when you're trying to mess with the server config at this point).
Solution: you'll have to rename them (replace dash with dot!)
Hope this helps someone!
Leave a Comment