TFS和引用的DLL [英] TFS and referenced DLLs

查看:78
本文介绍了TFS和引用的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用TFS和VS 2010.

We are using TFS and VS 2010.

我一直在研究一个使用TFS作为源代码控制的项目. 我已经下载了很多dll(例如log4net)并在我的项目中引用了这些文件.

I have been working on a project that is using TFS as source control. I have quite a few dlls that I have downloaded (such as log4net) and referenced in my project.

当一个新的程序员连接到TFS并使我的项目脱离源代码控制时,它无法构建,因为它说缺少所有这些引用的dll.

When a new programmer connected to TFS and got my project out of source control, it failed to build as it said it was missing all these referenced dlls.

我在这里做错了什么?如何在源代码管理中包含那些引用的DLL. 在引用它们之前,是否需要将所有这些dll添加到我的项目中?当我引用它们时,我只是浏览到它们在文件系统上的位置.

What did I do wrong here? How can I include those referenced DLLs in source control. Do I need to add all these dlls to my project before referencing them? when I referenced them, I just browsed to where they were on my file system.

推荐答案

我发现第三方DLL的最佳做法是在sln/proj文件结构中创建一个"Library"文件夹,并将所有必需的DLL复制到此本地文件夹以供参考.您还需要确保将这些DLL检查到源代码控制中.这样,每个在项目上工作的人都将获得所有DLL完全相同的版本,并且引用路径也将完全相同.

I've found the best practice for 3rd party DLLs is to create a "Library" folder in your sln/proj file structure and copy all the necessary DLLs into this local folder for reference. You'll also want to make sure these DLLs are checked into source control. This way, everyone who works on the project gets the exact same versions of all DLLs, and the reference paths are exactly the same.

在任意下载或安装位置引用第3方库将是有问题的,因为这将要求所有开发人员为所有DLL维护相同的下载结构.另外,如果每个人都在项目结构之外引用DLL,则很难保证每个人都使用相同的版本.

Referencing 3rd party libs in a arbitrary download or install location will be problematic, because it will require all developers to maintain the same download structure for all DLLs. Also, if everyone references DLLs outside of the project structure, it's harder to guarantee that everyone's on the same version.

另一种选择是让每个人都将DLL安装到GAC中,但这也确实是一件痛苦的事情,尤其是在版本管理和部署中.

The other option would be to have everyone install the DLLs into the GAC, but that can be a real pain too, especially with version management and deployment.

这篇关于TFS和引用的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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