3

I installed a self hosted Nuget server as described here. I am using Windows 2008 R2, IIS 7.5 and Nuget 1.7.

From within VS I am able to see my self hosted packages in the package manager window, but when I try to install any of them, I am getting an error "The remote server returned an error: (404) Not Found".

Help anyone?

dux2
  • 1,770
  • 1
  • 21
  • 27
  • How are you going about building the packages - through the command line or perhaps using a build server (e.g. TeamCity)? – dubs May 23 '12 at 19:40

3 Answers3

7

please make sure in IIS to set the .nupkg extention mime type to application/zip.

See also these discussion for more info: Issue #707, Discussion #246387

Alexandre Dion
  • 9,130
  • 2
  • 41
  • 29
2

Assuming you use IIS:

  1. Allow directory browsing for the virtual directory where you have your nuget packages
  2. Set the mime type for the .nupkg extension to application/x-msdownload That should fix your problem.
1

I hade to perform 3 actions in order to get this to work finally

1) Some of my packages has the extension ".symbols.nupkg" and I found out that the Nuget server cannot serve those packages only. If I change the extension of the package file from "".symbols.nupkg" to ".nupkg" everything works fine.

2) All the packages has to be placed flat under the packages folder (no sub-folders).

3) The packages folder has to be placed below the website (original location is fine, "~/Packages"). I tried to put it in absolute path "C:\NugetPackages" and it did not work.

dux2
  • 1,770
  • 1
  • 21
  • 27
  • Opened a discussion [here](http://nuget.codeplex.com/discussions/357619#post842633) and an issue [here](http://nuget.codeplex.com/workitem/2270) – dux2 May 31 '12 at 13:29
  • 1
    Having already followed the other steps in this answer I found that switching the Application Pool from "Classic" to "Integrated" fixed the problem for me – Twisted Feb 12 '13 at 17:07
  • A late update: We are now using the free ProGet (http://inedo.com/proget/overview) as a NuGet server. It has an easy setup and suits almost all our needs. – dux2 Aug 20 '13 at 06:09