I had a team project with a bunch of code as part of its source control (solution with 4 projects). I wanted to change the team project over to a new process template I created.
So I took a backup copy of my source code from my local filesystem, and then used tfsDeleteProject to delete the team project.
I opened up my .sln file and went to Change Source Control... and unbound all the projects and the solution.
I created a new team project using the same name as the previous one, and created a new source control root using the same name.
When I open up the source control explorer for the new team project I see the source control root and it contains the complete folder/file hierarchy from my code (I have not added any code to source control for the new team project yet). The folders are all grey with red X's on them, all the files have the checked-out icon on them (see screenshot below).
I went into my workspace config and removed the mapping that was there. I closed down VS and delete all *scc and .suo files from the project.
When I open the .sln file back up it gives me a dialog saying "The solution appears to be under source control, but its binding information cannot be found. Because it is not possible to recover this missing information automatically, the projects whose binding are missing will be treated as not under source control.", then it asks me if I want to Temporarily work uncontrolled or Permanently remove source control association bindings. I choose to permanently remove the bindings.
Solution explorer no longer shows any source control icons on the source files (which is what I would expect).
However, when I open up the Source Control Explorer for my team project, I now see 2 roots with identical names. Both roots contain the full hierarchy of my folders/files, all the folders a grey with red X's, all the files appear with teh checked out icon on them (see screenshot here: http://forums.divelements.co.uk/SourceControlScreenshot.jpg ).
When I right click one of the roots I have the option to Get Latest Version, Undo Pending Changes, Checkin Pending Changes. Check-Out is not available.
If I try to do Get Latest Version, it prompts me for a location on my harddrive to put it, I make a temp folder somewhere, and click OK. It gives me a progress bar for a second, then its done. The folder I chose is still empty. However, now the Check-Out option is available on both roots in Source Control Explorer.
If I try to do a Check-Out it says one of my items already has pending changes and won't let me complete.
If I try to do a Check-In Pending Changes it shows pretty much all my files listed with the change "lock, edit" for each one. I click check-in and it gives me a Conflicts dialog for pretty much every file saying the file has been deleted from teh server.
If I try to do Undo Pending Changes changes all the files under Source Control to appear as though they are checked-in (no checkmark icon). The folders are still grey with a red X.
What is going on here What do I have to do to properly get my code under source control in the new project

Source Control acting weird
augustocsb
When you used tfsdeleteproject to delete your first team project, it deleted the corresponding folder in source control, among other things. Deleted items remain in the source control repository, but they are marked as being deleted.
The reason you see the gray folder icons with red X's is that there is an option that controls whether you can see deleted items. In your case, it's turned on. That option is in Tools -> Source Control -> Team Foundation Server where there is a check box to show deleted items in Source Control Explorer. If you uncheck it, you'll no longer see the deleted items.
It sounds like you did the right things in terms of trying to unbind your solution from source control. It sounds like there's a bug here.
It sounds like you had files checked out under the folder of your original team project. Those pending changes still exist, even after you deleted the team project. I would have expected Get Latest to report conflicts on those files because you have pending edits against older versions of the files (the latest version is deleted). That sounds like a bug. Check-in properly reported the conflicts.
The fact that you see both new and old hierarchies with red X's is a bug. Try turning off the "show deleted files" option mentioned above to see if you can see the new team project folder in its proper non-deleted state.
It sounds like Undo actually worked properly. It undid the edits you had in the deleted team folder tree.
Going forward, if turning off the "show deleted items" option doesn't help, I'd recommend creating a new Team Project with a different name.
Using the current code, I'll walk through the steps you've described.
Buck
Vignesh Kannappan - MSFT
I tried to reproduce the problem with a brand new project (before the uninstall/reinstall), but wasn't able to duplicate the behaviour (I didn't have too much time to spend on this, so I might have been able to with more time).
I'll keep my fingers crossed that these kinks will be worked out by ship time.
TheGreenGenie
1. tf workspaces
this lists the workspaces on the client machine
2. tf workspaces /remove:*
this removes all the workspaces on the client machine
3. tf workspace /delete /server:yourservername yourworkspacename
This removes the workspace at the server
Notice this last command is workspace not workspaces which I use for the first two.
I run these commands after using tfsdeleteproject to remove the project and before re-creating the project.
Hope that helps,