1

We have recently upgraded from TFS 2012 to 2013. One of the new features in Visual Studio 2013 is the CodeLens or Code Indicators which can pull associated work item, changeset and test impact data from TFS for many members in code (classes, properties, methods, etc).

It is my understanding that it gets these references through and indexing task on the server. Having upgraded, I had wanted to see previous work reflected in the indicators, but alas all I had where the reference indicators.

CodeWarrior
  • 7,388
  • 7
  • 51
  • 78
  • I was advised (by someone @ MS) that the existing code was indexed in the background on low priority following an upgrade and may take quite a while depending on the size of the code base. – DaveShaw Mar 12 '14 at 22:31
  • In my case, I performed the upgrade late at night, ensured that the portal could be reached, and I did a test Get and commit. Left it over the weekend. Monday, got a fresh copy of the code, and all it had was the single commit from the previous Friday. Performed the steps below and all previous changesets and other stuff were populated within about 10 minutes. Something didn't take on mine apparently. – CodeWarrior Mar 13 '14 at 05:55

1 Answers1

2

The CodeLense information is impacted by the indexing settings on the server. If your code is not indexed, it will not populate the CodeLens indicators.

On your server, open a command line in admin mode.

Navigate to C:\Program Files\Microsoft Team Foundation Server 12.0\Tools

We'll be using the tfsconfig command line tool. For this I will be assuming your collection is named DefaultCollection.

tfsconfig CodeIndex /setIndexing:on /CollectionName:DefaultCollection

tfsconfig CodeIndex /reindexAll /CollectionName:DefaultCollection

If you would like, you can check the indexing status with the following:

tfsconfig CodeIndex /indexingStatus /CollectionName:DefaultCollection

Information on these and more commands can be found here.

CodeWarrior
  • 7,388
  • 7
  • 51
  • 78