在 VS2010 中跨项目共享我的 dll 库
通过 VS2010 在项目之间共享 dll 库的最佳方式是什么?例如,我们制作了一个在所有方面都有用的通用帮助程序库。然而,我们需要包含多个库(这是 TFS 中的一个单独的项目),因此分支不适合。
我们使用 Team Foundation Server 2010 进行源代码控制。是否有一种简单的方法可以将这些库集成到新项目中,以便新项目可以非常快地“完全抛光”?
我们现在要做的就是遍历每个项目,构建它们,存储 dll 文件,添加一个新项目,然后将它们放入 Bin 文件夹中,当您有很多库时,这是一项乏味的工作。
What is the best way to share dll libraries between projects, through VS2010? For example we have made a generic helper library that is useful in everything. However, we need more than one library to be included (which is a separate project in TFS) so branching is not suitable.
We are using Team Foundation Server 2010 for source control. Is there maybe a simple way to integrate these libraries into a new project, so the new project can come "fully buffed" very fast?
What we do now is go through each project, build them, store the dll files, add a new project then throw them in the Bin folder, which is tedious work when you have many libraries.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否考虑过 托管您自己的 NuGet feed?我对每个项目使用 NuGet 预构建脚本,它会在项目构建之前为我下载包,并且我认为,可以让它们保持最新状态。
Have you thought about hosting your own NuGet feed? I use a pre-build script for NuGet for each of my projects which downloads packages for me before the project is built, and, I assume, keeps them up to date.
我不认为有一些基于 TFS 的解决方案可以在项目之间共享二进制文件。不过,您可以使用 NuGet 来为您完成此操作。为每个项目创建 nuget 包(您可以创建 TFS 构建定义以自动执行此操作)并将其发布到网络共享。然后将此共享添加为 NuGet feed。
I don't think that there is some TFS-based solution for sharing binaries between projects. However you can use NuGet to do it for you. Create nuget package for each project (you can create TFS build definition to do it automatically) and publish it to network share. Than add this share as NuGet feed.