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
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?
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?
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.
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?
Maybe Julien can chime in and clarify this.
I see no solution in sight. :-(
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.
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).
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!