【发布时间】:2015-11-16 20:00:35
【问题描述】:
我按照Hosting Your Own NuGet Feeds上的说明进行操作:
- 创建一个空的 Web 应用程序
- 安装了
NuGet.Server包 - 在 Web.config 中将
~/Packages设置为packagesPath - 在 Web.config 中设置我的 API 密钥
- 使用
NuGet.exe从类库创建 .nupkg 文件 - 在 IIS 中创建了一个名为“NuGet”的新应用程序
- 授予
IUSR和IIS_IUSRS用户和组的读/写访问权限 - 从命令行运行
nuget setApiKey ABC123 -Source http://localhost/NuGet - 跑
nuget push Foo.Bar.dll.nupkg -Source http://localhost/NuGet
推送到 NuGet 服务器成功。我可以在 Windows 资源管理器中查看该文件夹并查看 .nupkg 文件。
当我转到 http://localhost/NuGet/nuget/Packages 时,我收到一个 RSS 提要,显示我刚刚推送的包。
当我转到 http://localhost/NuGet/nuget/ 时,我得到一个空的包列表:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<service xml:base="http://localhost/NuGet/nuget/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
<workspace>
<atom:title>Default</atom:title>
<collection href="Packages">
<atom:title>Packages</atom:title>
</collection>
</workspace>
</service>
在 Visual Studio 中配置 NuGet 以包含 http://localhost/NuGet 作为包源之一后,我也无法安装我刚刚推送的包。
这一切都在运行:
- Windows 7
- IIS 7.5
为什么 NuGet 包会显示在 RSS 源 (/NuGet/nuget/Packages) 中,而不是通过 /NuGet/nuget?
【问题讨论】:
标签: visual-studio iis nuget nuget-server