We have a project which cannot be removed completely. We use TFS API output all the projects and their size and we find a project which we cannot see it on the web or VS. The project is very big(more than 200G). We try to delete it, but met some problems. I tried to remove it with the command "TFSDeleteproject ..." and got the error message as bellow.
"The team project could not be deleted. Either the delete operation failed, or project creation failed but partially-created project could not be deleted. Review the previous entries in this log for details. The team project has been taken offline and remains in a non-operational state. It is not accessible to Team Explorer. To complete the deletion, address the errors noted in this log, and then attempt deleting the project again."
Is there any other way to remove the project? Any advice is welcomed.
Thanks,
I think You read Delete a team project with TFSDeleteProjec guide.
There is even a description on how to Verify Project Deletion.
In addition I think main space occupation can be related on version control files, if this is Your case you can use TFS Destroy command to destroy, or permanently delete, version-controlled files from Team Foundation version control and related changeset history.
If you not like command line, I suggest to use TFS Source Control Explorer Extensionthat integrate destroy in source control advanced right click menu.
Related
In the past, we seem to have created a TFS repository that was not part of a project. It seems that this is no longer supported by TFS in recent versions.
After updating TFS 2013 to 2015 and then 2017 we did not immediately notice the problem, but looking in the Collection Management screen on the web portal shows that the "Project" (which is not a project) is marked in a "Deleting" status.
The Microsoft page about this says that if you want to keep the code, no action needs to be taken. That "Deleting" status worries me however.
Is there any way to add an existing repo to a project? I can create a new project. I can add a new repo to a project. Can I add an existing repo to a project?
Alternatively, can I "Un-Deleting" that repo somehow?
That page have described this very clear:
Otherwise, no action is required. Placeholder team projects are
hidden in Web Access and Team Explorer in Visual Studio. Therefore,
they have no significant effect on day-to-day usage. As with any
other deleted item in Version Control, you can still access the
corresponding project in Source Control Explorer if the Show/Hide
Deleted Items button is enabled.
As you said, Placeholder team projects are not real team projects. When you delete a real team project, it will permanently removes data associated with that project from the database. You cannot recover it later.
They are just as deleted folders/items in TFS, you could undelete them in Visual Studio Source Control. Just select the deleted folders and right click it select undelete , and check in pending changes. Then you could get/download all files in the repo to local. Create a new team project, add files to the project, finally delete the particular placeholder project.
Since there is no way to import deleted files to either a existing project or a new project. Above is a safety workaround, the only disadvantage is it will lose the source control history of those folders. Otherwise, you could also take no action as the page suggested, the Placeholder team project will not be deleted. If you encounter any problem about this, you could contact the TFS support.
When trying to create a project in TFS, the CreateProject activity fails. However, the job exists and any attempts to create a project with the same name will fail due to duplicates. Even though the system is treating these failed creations of projects as legitimite and existing items, they are not available for use. If you view the web portal or source control explorer in TFS, the projects are not in the list.
Now that the root issue (the one that caused the activities to fail) is fixed, I want to delete these so I can recreate them. Since the projects don't show up in the web client, I can't delete them, and the delete option in the management console isn't available for projects with a blank State. Furthermore, every time I attempt to "Rerun Job", it just tells me that I can't. There's no descriptor as to why I can't.
Is there a way I can manually remove these project entries from the source of data without damaging the rest of the system? Or are there supported means for overcoming such an obstacle?
You can use the TFSDeleteProject utility to destroy the project i.e. get rid of all the data remnants of deleted project.
https://learn.microsoft.com/en-us/vsts/tfs-server/command-line/tfsdeleteproject-cmd
PS: Please use it with caution as you can do quite a bit of damage if you are not careful.
I used before free TFS from Visual Studio Online. I worked fine, I added some projects to TFS and did check-in and check-out without problem. But now it just stop working. When I try to check-in new projects, I get the following error:
The following issues were encountered during check in: TF10169:
Unsupported pending change attempted on team project folder $/Code.
Use the Project Creation Wizard in Team Explorer to create a project
or the Team Project deletion tool to delete one.
What is Project Creation Wizard? How I can run it? And what is happened with my account? I see the message:
Your account is an Early Adopter account. In 31 days your account will
revert to a standard account.
Maybe that's why it's not working anymore?
You cannot create or delete folders at the top-level of the source tree. (Eg, $/Code).
The top level of the source tree is reserved for Team Projects, which must be created and deleting specially. If you want to delete $/Code, you will need to undo your pending change that deletes it and instead delete it using the Project Creation Wizard or the TfsDeleteProject command.
I have a Visual Studio Solution (2010) containing code projects that were under source control in Team Foundation Server 2010. That collection/project no longer exists, but the code was not removed from the collection. The collection and project have been created over again exactly as it was the first time. When I open the solution in VS, it tells me that it can find my project, it is offline, and asks if I would like to go online. I click yes, but then it errors and says it can not find the workspace. All my files are read only. I assume this is because of the source control and, since it's not hooked up, I can't check them out (remove the read only).
How do I purge the solution of the old and hook everything back up again, short of recreating all the code solutions over again?
EDIT
To clarify:
Collection refers to TFS Collection
Project refers to TFS Team Project
Solution refers to VS Code Solution
The problem is the code solutions are still associated with the team project, which doesn't exist. When I open it, I get the message "This solution is offline, but its associated TFS server is available. Would you like to go online with this solution after it has loaded?" Yes "Unable to determine the workspace for this solution"
When you have loaded the projects, enable the Source Control - Team Foundation Server tool bar, click the "Change Source Control" button (only one enabled) and it asks you if you wish to permanently remove the association with source control.
I'm banging my head for several hours but couldn't find the solution on my problem. I have a team project collection. one of the project in collection is corrupted probably. It doesn't show up either in Team Explorer nor in TFS Administrator. but I can see that project in Source Control Explorer from VS. I tried TFSDeleteProject but it says:
TF200016: The following project does not exist:........
I can't create a team project with same name, nor I can delete it.
I looked at the database and there are entries about the corrupt project in many tables. Any idea how to remove it? maybe with the help of some SPs? I tried DeleteProject stored procedure, it didn't show an error, but it also didn't delete the project.
thanks.
Have you tried simply deleting it from source control?
TFS is comprised of several components (issue tracker, reports, source control, etc.), which, although typically used together, can also function individually. A file/folder in source control that does not belong to any project is thus possible. I don't know if you can create this situation manually, but it could result from a bug.
You need to use tfsdeleteproject to remove this.
The DB isn't corrupt, you cannot delete Team Project level source control folders through the UI.
tfsdeleteproject /collection:<url> <teamproject|srcfoldername>
You can always get the collection url by selecting the collection node in Team Explorer and hitting F4 to view the properties pane. Copy/paste the url. The Source Control folder you are trying to delete is likely the same as your Team project name.