Deleting Team Projects

How can I delete a team project from my TFS? I can remove it, but it still exists on the server. I would like to delete it completely. Thanks.
[142 byte] By [Jonny_B] at [2008-3-7]
# 1

There is a command line utility, TFSDeleteProject, to delete the project. By default, this utility is in drive:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies.

Run the following command to delete a project:
TFSDeleteProject /Server:servername projectname

NarenDatha-MSFT at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 2
Or if you are as lazy as I am : http://julien.lavigneducadet.com/index.php?2006/08/03/7-user-interface-to-delete-a-tfs-project
JulienLavigneduCadet at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 3
your tool doesn't wipe out the source repository though.
d94fse at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 4

I have run Julien Lavigne du Cadet's program but the "deleted" project are still visible in Source Control Explorer. I have tried to run TFSDeleteProject (both with an without /force) but it gives me the error message "The project '<project name>' was not found on the Tfs Servern".

Anybody got a clue how to resolve this?

Jurn at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 5
Just hit refresh in Team Explorer and they will be gone for good.
TiagoPascoal at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 6

Of cause I have tried to refresh and yes it's gone in Team Explorer, but it's still visible in Source Control Explorer. I have even completely reinstalled my workstation and its still there. It seems that there are some data left in some tables. As d94fse commented earlier I think that some repository data was not removed by the tool. Are other solution to find and delete this repository data?

Jurn at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 7
Sorry i misunderstood your question then.

Source control data is not "really" deleted.

AFAIK it is like this by design. If i remember correctly something to do with SOX compliance.

Perhaps someone from MS can chime in and confirm this.

TiagoPascoal at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 8

Ok, then it must be something else that was not properly “deleted” by Julien Lavigne du Cadet’s program. The projects I have deleted with TFSDeleteProject are gone in both Team Explorer and Source Control Explorer but the one I deleted by using Julien Lavigne du Cadet’s program are gone in Team Explorer but still visible in Source Control Explorer. Someone got a clue to resolve this?

Jurn at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 9

From what i've understood from Julien's post, his tool is just a GUI for tfsdeleteproject.

Maybe Julien can chime in and clarify this.

I see no solution in sight. :-(

TiagoPascoal at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 10

The same thing happened to me... how on earth do I delete the project from source control now? The command line tool cannot see the project so there's no way to delete the source files that way it seems... *sigh*

Also, try to create a new project with the same name - it will fail:

Error
Project already exists on the report server
Explanation
The name you typed for the new team project is already in use as a site on the SQL Server Reporting Services at {0}. The team project name must be unique on all Team Foundation servers used by the new project.
User Action
1. Close the New Team Project Wizard. 2. Restart the New Team Project Wizard. 3. Type a unique name for the new team project

Lesson learned - do NOT create projects in the production TFS environment that you plan to delete later.

JoDan at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 11
I'm having the same problem after using Julien's tool. Did anyone figure out how to solve the problem of the project still showing up in the source control explorer?
BradMcDonald at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...
# 12
I finally found a fix for this problem.

Apparently, Julien's tool does not set the deleted flag for the work items, so I had to manually set this flag in the TFS database. The table is TreeNodes in the WorkItemsTracking database. Set the fdeleted flag to "True" for the project you want to get rid of (or recreate).

Once you have done this, you can follow the instructions on James Manning's post in this forum (copied below).

"In order to delete an orphaned folder (we'll call it $/OrphanedFolder)

You'll want to create/add a user (that's *not* in the Team Foundation Administrators group), such this user has the CREATE_PROJECTS permission in the Team Foundation server ("Create new projects" in the UI under right-click on the server in Team Explorer -> Team Foundation Server Settings -> Security) and admin in Reporting Services and Sharepoint only.

Then, as a normal Team Foundation admin (for instance, TfsSetup), you'll deny Read permission to that folder ($/OrphanedFolder) for the above user.

At this point, you'll be able to create the "OrphanedFolder" team project as this new user. Since they don't have Read permission, they'll be able to bypass this "does the folder already exist?" check. You'll still need to make sure to select "don't create the folder" during the team project creation.

Finally, with the team project created again, you'll be able to delete the team project as a normal TF admin (TfsSetup) and that should take the $/OrphanedFolder with it.

A huge thanks to dzimmy for all his help! Note that these steps worked for him, so hopefully they'll work for others in this situation as well."


This worked for me. Good luck!

BradMcDonald at 2007-8-30 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Process Templates...

Visual Studio Team System

Site Classified