MSBuild-script gets the following error when trying to check in changes: TF14061: The workspace TeamCity-<...> doesn't exist

Jakob Lunde 96 Reputation points
2021-07-20T09:13:05.82+00:00

We use Team City to, among other things, increment the version number and check in that change.
Checking in fails with the aforementioned error. The message makes sense, because that workspace doesn't exist, so I guess my question is why does it try to check in from a non-existing workspace? And how do I fix it?

Additional info:

  • The build server has been in use for a long time, but Team City was recently updated and the old workspaces were replaced. I'm guessing that somewhere in a cache or settings file the old workspace name still exists for some reason?
  • If I open Visual Studio on the build server and check in from there, everything works fine
Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. Jakob Lunde 96 Reputation points
    2021-07-20T11:14:11.68+00:00

    So the issue in my case was related to cache, and I sort of cleaned it by accident:

    • On the build server pc, I ran the command tf workspaces which listed a bunch of non-existing workspaces.
    • I checked to see what was listed on the server with tf workspaces /collection:TeamProjectCollectionUrl /owner:*, and it warned me about some local paths being mapped in several workspaces, and that it would remove some of the workspaces from the cache.
    • Now it works
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.