Wednesday, September 12, 2018

The workspace XXX;Project Collection Build Service (TEAM FOUNDATION) does not exist.

Let's discuss today not usual error.

How to fix workspace issue, if you did not successful move it?
This error possible to face in two situation: when you move (modified) workspace in you local computer. For example Visual Studio.
Or if you clone build agent with virtual machine or physical server. In this case you can delete all work space but see same issue:



Microsoft.TeamFoundation.VersionControl.Client.WorkspaceNotFoundException: TF14061: The workspace XXX;Project Collection Build Service (TEAM FOUNDATION) does not exist. ---> System.Web.Services.Protocols.SoapException: TF14061: The workspace XXX;Project Collection Build Service (TEAM FOUNDATION) does not exist.
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.HandleReply(TfsClientOperation operation, TfsMessage message, Object[]& outputs)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
at Microsoft.TeamFoundation.VersionControl.Client.Repository.DeleteWorkspace(String workspaceName, String ownerName)
at Microsoft.TeamFoundation.VersionControl.Client.Client.DeleteWorkspace(Workspace workspace)
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.Core.TfvcHelper.PrepareWorkspace(VersionControlServer server, String workspaceName, String rootPath, WorkingFolder[] workingFolders, Boolean cleanRepository)
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.Core.TfvcHelper.SyncRepository(VersionControlServer server, Uri repositoryUrl, String workspaceName, String rootPath, WorkingFolder[] workingFolders, String sourceVersion, Boolean cleanRepository, String shelveset, String reshelveName, Boolean gatedRunCI, CancellationToken cancellationToken)
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.Core.TfvcHelper.Sync(ITaskEndpoint endpoint, String localPath, Dictionary`2 serverPathMapping, String sourceVersion, Boolean cleanRepository, String workspaceName, String shelveset, String reshelveName, Boolean runCI, CancellationToken cancellationToken)
at Microsoft.TeamFoundation.DistributedTask.Plugin.Build.TfvcSourceProvider.<>c__DisplayClass3_0.<PrepareRepositoryAsync>b__0()

So this error say: I have in cash xml file in folder with all records for workspace.

But I don't see this workspace in host.

In some case Visual Studio can't take care about correct deleting workspace.
It is easy to fix! Let's help them!
Go to folder:
C:\Users\<Name of User>\AppData\Local\Microsoft\Team Foundation\<X>.0\Cache

And delete all content in this folders.
After this build agent should automatically remap workspace. In case VS locally you need do it manually.
That's all!
Thank you for visiting my blog.

No comments:

Post a Comment