有個TFS組建定義(Build Service)怪怪的,無法下載原始碼,幾經嘗試無解,索性刪掉再重設一次。(推薦VS TFS Power Tools,組建定義選單多出「Clone Definition」可以複製現有組建定義修改,不用從頭做起)

不料,新増相同原始碼來源的組建定義後,執行出現以下錯誤:

Exception Message: Unable to create the workspace '9_1_VM-BLD-SVC12' due to a mapping conflict. You may need to manually delete an old workspace. You can get a list of workspaces on a computer with the command 'tf workspaces /computer:%COMPUTERNAME%'. Details: The path D:\Works\1\PRJ\PRJQ-Test\src is already mapped in workspace 8_1_VM-BLD-SVC12. (type MappingConflictException)

大意是先前被刪掉的建置定義已將該專案原始碼對應到8_1_VM-BLD-SVC12工作區,新増的組建定義企圖另建一個新的9_1_VM-BLD-SVC12工作區對應原始碼,因而產生衝突,錯誤訊息提示需使用tf.exe工具刪除舊工作區解決。(在同一台電腦上,工作區與原始碼版控儲存區必須保持一對一的唯一對應)

遠端登入TFS Build Service主機,開啟Visual Studio 2013工具的開發者命令提示字元(Developer Command Prompt for VS2013),輸入tf workspaces可列出目前已建立的工作區,8_1_VM-BLD-SVC12名列其中,Owner為bldsvc.user。使用tf workspace /delete 8_1_VM-BLD-SVC12;bldsvc.user將它砍了,問題排除。

C:\Program Files (x86)\Microsoft Visual Studio 12.0>tf workspaces
Collection: httq://tfs:8080/tfs/prj-one
Workspace        Owner       Computer     Comment
---------------- ----------- ------------ -------------------------------------
1_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build
2_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build
3_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build
4_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build
5_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build
6_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build
7_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build
8_1_VM-BLD-SVC12 bldsvc.user VM-BLD-SVC12 Workspace Created by Team Build

C:\Program Files (x86)\Microsoft Visual Studio 12.0>tf workspace /delete 8_1_VM-
BLD-SVC12;bldsvc.user
A deleted workspace cannot be recovered.
Workspace '8_1_VM-BLD-SVC12;bldsvc.user' on server 'httq://tfs:8080/tfs/prj-one' 
has 0 pending change(s).
Are you sure you want to delete the workspace? (Yes/No) y

C:\Program Files (x86)\Microsoft Visual Studio 12.0>

Comments

Be the first to post a comment

Post a comment