tags:

views:

13

answers:

1

Someone added a workspace incorrectly, so after I fixed it TFS thought I had added some files to the project (dll, pdb, and xmls). So I tried just deleting the files and refreshing the pending changes. I tried clicking undo, but the Output window says

No pending changes were found for $/SourceCode/Apps/.../Lib.dll.

(I replaced part of the full path here). So the undo won't do anything. I tried "Refresh Status" under File-> Source Control after every step. I tried re-adding these files and then doing the undo. So for example I am stuck with


Name         Change

UI.xml         add, lock
Design.dll         add, lock


and can't remove them. Any suggestions are appreciated. Thanks!

A: 

Don't delete. Once you "add" them to TFS, it creates an entry in the database just waiting for the files. Instead, undo your "add."

That's actually how to fix this problem as well.

Right click on any source file in the source explorer, and choose Undo Pending Changes. Uncheck everything except for the two files that you need to get rid of the add. Click OK to undo those changes.

That will clean up everything in the TFS database.

Robaticus
Ok I copied the files back to the folder that TFS thinks the files are in.Then I went to Source Control Explorer and right clicked a file that I had checked out and selected Undo. It brought up the list that matches my pending changes window and I selected only the files that I am trying to remove.Nothing happened except it shows the Output window with "No pending changes were found for $/SourceCode/Apps/../UI.xml." for each file.Of course there weren't any changes, it isn't in Source Control. Usually when I decide to not add a file your process works, so I don't know why it wont now.
Gary
This can happen if you aren't in the correct workspace. You have to set active the workspace that was used when the files were added.
Robaticus
Wow, grammar fail on my part. What I was trying to say is, you need to have the same workspace active that was active when the files were added.
Robaticus
Ok, I was able to open the project where those files were with all the workspaces corrected and found those files in the bin. There was no lock or check or plus next to them like the other files in the solution (I expected a plus). I highlighted them and pressed the delete key. They were all removed but the .refresh files were put in my Pending Changes (with a "delete, lock") so I undid those changes (from the Pending Changes window). Now just the .refresh files show in the bin with lock icons as they should.Thanks for triggering the idea, don't know why I didn't try it earlier.
Gary