引用:http://www.cnitblog.com/MartinYao/archive/2008/02/26/40167.html
TFS 2008中未在界面中提供删除团队项目的功能,但可通过如下命令行的方式删除:
用法: TfsDeleteProject [/q] [/force] </server:<服务器名>> <团队项目名称>
打开Visual Studio 2008命令窗口:
TfsDeleteProject /q /server:http://192.168.0.3:8080 项目名称
在弹出的登录窗口中输入用户名和密码,从 Team Foundation 中删除团队项目。要使用此命令,您必须是 Team Foundation Server Administrators (Team Foundation Server 管理员)组的成员或待删除项目的 Project Administrators (项目管理员)组的成员。
注意:删除团队项目后将无法恢复。
参数说明:
[/q] - 不提示进行确认。
</server:<服务器名>> - Team Foundation Server 的名称。
[/force] - 即使无法删除某些数据也继续。
<团队项目名称> - 项目的名称。如果名称中有空格,请使用引号。
==================================================================================================================
操作过程:
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
C:\Program Files\Microsoft Visual Studio 9.0\VC>tfsdeleteproject /?
Team Foundation Delete Project Tool
Copyright (c) Microsoft Corporation. All rights reserved.
Usage: TfsDeleteProject [/q] [/force] </server:<server name>> <team project name
>
Deletes the Team Project from Team Foundation. To use this command, you must be
a member of either the Team Foundation Server Administrators group or a member
of the Project Administrators group for the project you are deleting. Use this
command with caution because after deleting the team project it cannot be recove
red.
[/q] - Do not prompt for confirmation.
</server:<server name>> - The name of the Team Foundation server.
[/force] - Continue even if some data cannot be deleted.
<team project name> - The name of the project. Use quotes if there are space
s in the name.
C:\Program Files\Microsoft Visual Studio 9.0\VC>tfsdeleteproject /q /server:http (红字当中的空格真的很重要!!)
://197.153.0.200:8080 mdersolution
Deleting from Build ...
Done
Deleting from Work Item Tracking ...
Done
Deleting from Version Control ...
Done
Deleting Report Server files ...
Done
Deleting SharePoint site ...
Done
Deleting from Team Foundation Core ...
Done