1

How does one remove a project from a solution in TFS?

We are using the TFS version control system.

We have a sln file that has lots of projects.

I have removed the project from the Solution Explorer.

But in the "Source Control Explorer" window, the folder containing the project's files are still there.

If I try to delete the folder I want to delete from the "Source Control Explorer" window, and I get an error that says it cannot be deleted. It says that one or more children have pending changes. Well, I have the folder checked out. What else do I have to do?

The files in the project are listed as being checked out.

3 Answers 3

3

You cannot pend changes on items and then delete their parent. This prevents data loss - for example, if you were to pend an edit on $/A/file.txt and then delete $/A, you would lose those uncommitted changes. Thus, you must explicitly undo the edit changes if you really want to delete the folder.

(If you only have deletes pended on the children, you are still allowed to delete the parent folder, as this would not result in data loss.)

2

Simply use "Undo Checkout" from the workspace that has the files checked out.

1

You can also use the command line to perform a delete.

tf delete [/lock:(none|checkin|checkout)] [/recursive] [/login:username,[password]] itemspec

http://msdn.microsoft.com/en-us/library/k45zb450.aspx

Also, note that the items are not officially deleted until you perform a Check-in of the delete.

" The results of this command are not visible in other workspaces until you perform a check-in operation. For more information, see Check In Pending Changes."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.