Unable to determine the source control server – TF Destroy (TFS)
We are running couple of tests before we perform the actual migration our source code content from SVN to TFS 2010. Since we are still in testing phase, we are running into couple of problems, one of them being unable to delete the existing repository within TFS collection.
This action is performed in visual studio command (not sure why a simple gui is provided for this!) and command name is tf destroy.
Command takes a parameter which is basically the source.
sample:
>tf destroy $”/Testcode/QA1″
If there are multiple collections configured within TFS, this command will through out an error message “Unable to determine the source control server”.
The resolution is simple – provide the server being used (with input /s:<servername>)
>tf destroy $”/Testcode/QA1″ /s:”http://<server>/tfs/<collection>“
When server name is provided TF will use this in order to make appropriate call to destroy the appropriate content.
Few more command which comes in handy:
>tf workspaces => lists down all the existing workspace configurations
>tf destroy /preview $”/Testcode/QA1″ /s:”http://<server>/tfs/<collection>“ => this helps in previewing the content which is about to get deleted