我是Team Foundation Server的新手,我嘗試使用c#編程連接到項目。我有下面的代碼塊...使用GetWorkspace連接到Team Foundation Server工作區
string serverName = "http://tfs01:8080";
TeamFoundationServer tfs = new TeamFoundationServer(serverName);
VersionControlServer version = (VersionControlServer)tfs.GetService(typeof (VersionControlServer));
Workspace workspace = version.GetWorkspace("Test", version.AuthenticatedUser);
MessageBox.Show(workspace.Name);
當我執行我收到以下錯誤代碼......
TF14061: The workspace Test;vercuskis does not exist.
「測試」項目是關閉根的,是分享範圍從VS 2008團隊資源管理器,我確實有安全訪問權限,我用它來檢查和檢出代碼就好了
我不確定是否在代碼中正確引用了「Test」項目。我正在尋找如何從TFS根目錄中引用項目名稱的示例。
謝謝
阿好,我知道,... ...那麼我想它不是我要找的工作區。我想連接到該項目並查看源項目中的所有項目。我猜我必須查詢TeamFoundationServer對象才能進入。 – 2009-07-14 13:39:26