Unable to download packages from a self hosted nuget server (404 error)

妖精的绣舞 提交于 2019-12-02 00:06:59

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/10716156/unable-to-download-packages-from-a-self-hosted-nuget-server-404-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!