我应该将 log4net 与我的版本一起分发吗?
我想知道在依赖关系方面什么是最佳实践以及如何进行发布。 就我而言,我有一个依赖于 log4net 的库,我想知道是否应该随发行版一起分发 log4net.dll(将 log4net 引用设置为复制本地)?
我可以简单地说 log4net 应该安装在 GAC 中吗?
I am wondering what is best practice when it comes to dependencies and how releases should be done. In my case I have a library that relies on log4net and I am wondering if I should distribute log4net.dll (set the log4net reference to copy local) along with the release?
Could I simply state that log4net should be installed in the GAC?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
依赖 GAC 中的库可能会导致版本冲突以及其他很难排除故障和调试的问题。 我总是尝试用我的软件分发所有内容。
Relying on libraries in the GAC can cause version conflicts and other problems that are very hard to troubleshoot and debug. I always try to distribute everything with my software.
我不太喜欢将 log4net(或 NUnit)放入 GAC 中。 我更喜欢将第 3 方库保留在本地 - 它可以更清楚地说明依赖项是什么以及您正在使用的版本。 这也意味着任何想要开始您的项目的人都可以下载、提取和构建。
所以,是的,我建议您分发 log4net.dll 及其许可协议。
例如,查看 我的 ProtoBuf 端口的 lib 目录。
I'm not a big fan of putting log4net (or NUnit) in the GAC. I prefer keeping 3rd party libraries local - it makes it clearer what the dependencies are and what version you're using. It also means that anyone wanting to get started with your project can just download, extract, and build.
So yes, I suggest you distribute log4net.dll, along with its licence agreement.
Have a look at the lib directory for my ProtoBuf port for example.