在哪里存储外部DLL文件? [英] Where to store external DLL files?

查看:149
本文介绍了在哪里存储外部DLL文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目,我使用一些第三方库。我包括他们使用Visual Studio中的引用文件夹中。

In my project I'm using some third-party libraries. I include them using the references folder in Visual Studio.

但我应该在哪里保存DLL文件?它们是由文件系统路径引用,但它会很好,如果我可以把它转化项目。 ?但如何

But where should I save the DLL files? They are referenced from a path in the file system, but it would be nice if I can include it into the project. But how?

推荐答案

这是我做的:


  • 创建一个 LIB 在解决方案级别

  • 下载文件夹,我所有的第三方的DLL文件复制到那里

  • 从lib文件夹

  • 参考把所有的DLL文件中的源代码控制的。我使用的颠覆,我手动添加,但这是一次性的。

  • Create a lib folder at the solution level
  • Download and copy all my third-party DLL files into there
  • Reference from the lib folder
  • Put all those DLL files in the source control. I am using Subversion, and I add them manually but this is one-off.

您还可以添加一个解决方案文件夹,并添加他们那里。

答案是以上时的的NuGet 是在婴儿期。 FWIW,我的做法在那里我们有项目的NuGet:

The answer above was when NuGet was in infancy. FWIW, my approach where we have NuGet items:


  1. 如上面做简单的DLL文件的依赖关系(他们没有的NuGet PKG )

  2. 启用包还原的解决方案

  3. 更改 packages.config 文件,如果到版本锁定到一个特定的软件包

  4. 请不要包装自己存储在版本控制系统(设置忽略的 Git的水银等)

  1. Do as above for plain DLL file dependencies (where they don't have a NuGet pkg)
  2. Enable "Package Restore" for the solution
  3. Change packages.config file if needed to lock down the version to a particular package
  4. Do not store the package themselves in the version control system (set ignore for Git, Mercurial, etc.)

我实际使用的NuGet管理甚至内部依赖,并有一个私人的饲料。

I actually use NuGet for managing even internal dependencies and have a private feed.

这篇关于在哪里存储外部DLL文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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