2011年11月21日

Team Foundation Service Preview - 刪除Team專案

在這之前,先聲明一點,目前Team Foundation Service Preview版,要刪除Team專案,必須在Visual Studio 2011 Developer Preview底下才能刪除,不能於專案網頁、Visual Studio 2010下刪除,官方也指名說,這是一個Bug,總之未來會修正。

刪除的方法,也不是進入Visual Studio 2011裡面,而是要使用Administrator權限開啟cmd視窗來刪除。

以下是刪除的指令,主要注意的是https後面加的是你的Team Foundation Service網址,後面要記得加上Collection,也就是DefaultCollection,不然會出錯,最後面在接上Team專案名稱,這裡的專案名稱是Testing。( 目前tfsdeleteproject命令,在Visual Studio 2012 RC裡面,存在的路徑為c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\ide 底下 )

C:\project>tfsdeleteproject /collection:https://buckh-test2.tfspreview.com/DefaultCollection Testing

如果沒有加上Collection可能會產生以下這個錯誤。

C:\project>tfsdeleteproject /collection:https://buckh-test2.tfspreview.com Testing
Team Foundation services are not available from server https://buckh-test2.tfspreview.com/.
Technical information (for administrator):
  HTTP code 404: Not Found

這裡是順利完成的畫面和訊息,命令下完後,會跳出登入畫面,要求你登入帳號,最後會請你確認,按下y後就會開始刪除,因為本來就還沒有Reporting Service和SharePoint,所以當然會有錯誤,不過也可以發現,未來Team Foundation Service會整合Reporting Service 和 SharePoint

C:\project>tfsdeleteproject /collection:https://buckh-test2.tfspreview.com/DefaultCollection Testing

Warning: Deleting a team project is an irrecoverable operation. All version control, work item tracking and Team Foundation build data will be destroyed from the system. The only way to recover this data is by restoring a stored backup of the databases. Are you sure you want to delete the team project and all of its data (Y/N)?y

Deleting from Build ...
Done
Deleting from Version Control ...
Done
Deleting from Work Item Tracking ...
Done
Deleting from TestManagement ...
Done
Deleting from LabManagement ...
Done
Deleting from ProjectServer ...
Done
Warning. Did not find Report Server service.
Warning. Did not find SharePoint site service.
Deleting from Team Foundation Core ...
Done

這裡是刪除畫面,因為目前在測試win8和Visual Studio 2011,就順便用這個環境刪除了XDD。

Parallels 圖片 5

最後補上,如果使用Visual Studio 2010刪除的錯誤。

C:\Program Files\Microsoft Visual Studio 10.0\VC>tfsdeleteproject /collection:https://buckh-test2.tfspreview.com/DefaultCollection Testing2

Warning: Deleting a team project is an irrecoverable operation. All version control, work item tracking and Team Foundation build data will be destroyed from the system. The only way to recover this data is by restoring a stored backup of the databases. Are you sure you want to delete the team project and all of its data (Y/N)?y

TF200040: You cannot delete a team project with your version of Team Explorer. Contact your system administrator to determine how to upgrade your Team Explorer client to the version compatible with Team Foundation Server.

參考資料

http://blogs.msdn.com/b/buckh/archive/2011/09/19/how-to-delete-a-team-project-from-tfs-on-azure.aspx

沒有留言:

張貼留言