3

I've nearly finished migrating a large solution to use NuGet for dependencies. Prior to this, the project simply had a Lib directory with all binary dependencies in sub-directories within it. There are, however, a few dependencies that aren't available in the official NuGet feed. Therefore, I have a few options:

  1. Add them to the official NuGet feed.
  2. Keep the existing Lib directory with any non-NuGet binaries within it.
  3. Create a project-local NuGet feed that contains only those packages that aren't available in the official feed.

I don't like #1 because it implies I'll be taking on responsibility for keeping the packages up-to-date. I don't like #2 because it's messy having two mechanisms for managing dependencies within the one solution.

Therefore, I'm leaning towards #3, but cannot find any documentation on conventions. I understand how to create the local feed, how to tell Visual Studio about it et cetera. What I can't find is whether there is a convention around the naming of the directory containing the local feed and anything else this approach may entail. Does anyone know what the standard practice is?

4

2 回答 2

2

您缺少的是选项 #4 - 设置私有 NuGet 存储库。这是解决此问题的标准做法。

有几个可用的私有 NuGet 服务器,包括我公司 ( Inedo ) 的一个:

  • Nuget.Server - 免费/开源之一;非常有限
  • ProGet - 用于防火墙后面;提供免费版本
  • MyGet - 托管服务;提供免费版本
  • Artifactory - 多平台(Java 等)

“依赖管理器”(即NuGet)的全部意义在于管理项目之间的依赖关系,因此拥有“项目本地存储库”实际上没有意义——这实际上只是一个非常复杂的“lib”文件夹。

于 2013-04-17T05:57:38.517 回答
1

项目本地 NuGet 提要...相对于您的项目,您希望将该提要放在哪里?你想如何与你的队友分享这个“本地”信息流?只是想知道,因为 NuGet 已经安装了所有项目本地包 ($(SolutionDir)\Packages),所以您也可以禁用包还原并将包提交到 VCS?

可能有另一种选择:您是否已经尝试过 MyGet.org?我们为您提供托管在 Windows Azure 上的 NuGet 即服务:注册、创建提要(或更多)、可选择保护提要、邀请其他人并开始使用。以下是在默认 NuGet 服务器功能之上提供的功能列表。MyGet 还免费确保与我们所有计划中的最新 NuGet 客户端工具兼容。

还有一个免费计划,您也可以开始试用任何其他计划。检查http://www.myget.org/plans或发送电子邮件以获取更多信息。例如,如果您正在寻找与本地 Active Directory 的集成,请查看企业计划。如果您不想要托管解决方案并希望自己维护所有内容,那么 ProGet 可能适合您。

于 2013-04-17T07:03:55.830 回答