Hosting Your Own NuGet Feeds

Just spent the best part of half a day, banging my head against the wall trying to get the NuGet push and pull operations to work.

The problem

Any operation either resulted in a 500, or 404 error.

NuGet.exe install MyProject.Platform -source http://mynuget.local:10418/NuGet -OutputDirectory c:\temp

The remote server returned an error: (404) Not Found.

Very annoying, and hardly the quick-n-easy solution its supposed to be.
Any how...

In the end, it turned out to be this

  • http://blogs.thesitedoctor.co.uk/tim/2011/09/02/Nuget+Server+On+IIS6+Returns+404+When+Downloading+Package+After+Upgrade.aspx

But, I had tried the following articles previously with no success

  • http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds
  • http://stackoverflow.com/questions/7407799/nuget-installing-individual-packages-reporting-the-remote-server-returned-an
  • http://stackoverflow.com/questions/7276420/nuget-server-returning-403s-and-404s
  • http://stackoverflow.com/questions/10716156/unable-to-download-packages-from-a-self-hosted-nuget-server-404-error
  • http://nuget.codeplex.com/discussions/283771

The solution

http://blogs.thesitedoctor.co.uk/tim/2011/09/02/Nuget+Server+On+IIS6+Returns+404+When+Downloading+Package+After+Upgrade.aspx

In addition to the above link, I thought I'd keep a record of how IIS7.5 does things differently:


  1. Click "Add Wildcard Script Mapping"
    1. Request path = *
    2. Executable = c:\windows\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll 
    3. Name = Whatever you like
After this, I'm pleased to say, my wasted morning was over finally over.

NuGet.exe push c:\Temp\Platform.1.0.1.0.nupkg -source http://nuget.local:10418/

Pushing Platform 1.0.1.0 to 'http://nuget.local:10418/'...
Your package was pushed.

NuGet.exe install Platform -source http://nuget.local:10418/Nuget -OutputDirectory c:\temp
'Platform 1.0.2.0' already installed.











Comments