管理非 nuget dll 以及 nuget 包 [英] managing non-nuget dlls along with nuget packages

查看:24
本文介绍了管理非 nuget dll 以及 nuget 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何指南或建议来管理不在 nuget 上的库以及在 nuget 上的包.

Are there any guidelines or recommendations for managing libraries that aren't on nuget along with the packages that are.

其中大多数可能是 3rd 方库,除非我们专门安装它们,否则它们可能永远不会继续使用 nuget.

Most of these may be 3rd party libraries that may never go on nuget unless we specifically put them on.

最好将这些 dll 放在 nuget 用于存储其下载的 dll 的同一文件夹之外,还是将它们放在一起更好?

Is it best to keep these dlls out of the same folder that nuget uses to store its downloaded dlls or is it better to keep them together?

一旦我们解决了这个问题,我们就会考虑迁移到 DVCS,并且可能会添加一个忽略文件来忽略整个包目录(并且可能会为这些非 nuget dll 添加排除项,或者如果它们只强制签入它们永远改变).

We would be looking at moving to DVCS once we sort this out and would probably add an ignore file to ignore the whole packages directory (and possibly add exclusions for these non-nuget dlls or just force them to be checked in if they ever do change).

推荐答案

我的个人偏好(按顺序)

  1. 创建一个包并将其添加到 NuGet(如果许可允许)
  2. 创建一个包并将其放入私有存储库中
  3. 在解决方案中创建一个文件夹,将它们全部存储在其中,并将它们添加到源代码管理中.与 nuget packages 文件夹不同的文件夹,因为它更清楚它是什么,而且我没有将 nuget dll 添加到源代码管理中.

对于 1 &2 我建议在构建时使用恢复包,而不是将其存储在源代码管理中.

For 1 & 2 i would recommend using Restore Package on build rather than storing it in your source control.

我还强烈建议不要从安装文件夹或 GAC 中引用任何第三方控件.

I'd also highly recommend against referencing any 3rd party controls from install folders or the GAC.

这篇关于管理非 nuget dll 以及 nuget 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆