I had a project in tfs within a team project then we moved the project to a different location in another team project.
I had configured Jenkins to connect to the team project and build my solution but when I changed the settings to connect to the new tfs team project, it gives me the below error:
[workspace] $ "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe" workspace -new Hudson-ProjectName1-Build-MASTER;domain1\username1 -noprompt -server:http://domain-eg.net:8080/tfs/newteamproject ******** The path D:\jenkins\jobs\ProjectName1-Build\workspace is already mapped in workspace Hudson-ProjectName1-Build-MASTER [http://domain-eg.net:8080/tfs/oldteamproject].
So the above shows that there is an existing workspace so I ran the below command to remove it
tf workspace -delete Hudson-ProjectName1-Build-MASTER;domain1\username1 -noprompt -server:http://domain-eg.net:8080/tfs/oldteamproject
and it prompted that the workspace has been removed but I'm still getting the same error.
I also checked whether the mapping has been removed or not by running the below command:
tf workspace -server:http://domain-eg.net:8080/tfs/oldteamproject Hudson-ProjectName1-Build-MASTER
but it says the workspace doesn't exist as expected.
So, I thought it might be caching it somewhere and ran the below command:
tf workspaces /remove:* /collection:http://domain-eg.net:8080/tfs/oldteamproject
and it said "No workspace in the cache matches * from server http://domain-eg.net:8080/tfs/oldteamproject"
so I'd guess it's not even cached.
So what's causing the error and how to resolve it?