TFS Annotation Error

2019-09-17 01:34发布

问题:

I've recently had a TFS 2015 to 2017 upgrade, and now I have this error whenever I try to do a Source Control->Annotate from the Visual Studio Solution Explorer:

Annotation Error

m_itempath or m_versionControl not set

If I try to run the annotate from the file editor, I get the different error:

Annotation Error

Unable to determine the workspace for the file C:\...

Using Visual Studio Enterprise 2015. This is a Server workspace, and all other operations seem to work as normal.

回答1:

Most of the solutions in

  • Is there workaround for when TFPT is "unable to determine the workspace" and refreshing the cache does not work?
  • TFS Error: Unable to determine the workspace for this solution

failed to work for me.

This did work:

  1. Go to Source Control Explorer
  2. Right-click on the mapped folder
  3. Select 'Advanced->Remove Mapping' and follow prompts. Ignore conflict screens.
  4. Select 'Advanced->Map to Local Folder' and map back to the existing folder.
  5. Resolve any outstanding conflicts.

After this, the annotations worked again.