我不知道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作爲源代碼管理並且它們很好地工作)。
作爲附錄:我見過很多開源的Visual Studio解決方案,它也以這種方式控制庫依賴關係。 – Spoike 2009-01-01 21:31:01