我按照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/nuget/Packages
),但不会通过 /NuGet/nuget
显示?