我不知道TFS,但每当我将VS解决方案的第三方库添加到源代码管理中时,我通常都会在解决方案文件夹中进行。
+-- MySolution
| // The solution is in source control
|
+-- MyProject1
| |
| +-- Project and source code files for a specific project
|
+-- MyProject1.Test
| |
| +-- Test files for MyProject1
|
+-- Third Party
| |
| +-- Library dll's are stored here.
|
|
+-- Solution files, more project folders, user settings (user settings are not in source control) etcâ¦
当你指出第三方库时,它们应该通过相对路径链接。验证这一点的唯一方法是打开*proj文件,如果所讨论的库是用相对路径而不是绝对路径链接的,则在依赖关系标签下查找。
要将库添加到源代码管理中,只需添加第三方文件夹即可。由于我没有使用TFS,我不确定它是否会搞砸这个设置(我使用Subversion或Mercurial作为源代码控制,它们工作得很好)。