5

I use Visual Studio 2010 in combination with the Team Foundation Server 2010 and the Power Tools.

In my code files (eg. \*.cs) I can right click in the editor and select Source Control"->"Annotate to get an additional column where I can see, who last modified the lines. This doesn't seem to work in my MVC-Views (\*.cshtml).

Is there a limitation of file types in the extension/function of the power tools?

How can I enable this very useful function for all text-based file types in Visual Studio?

BugShotGG
  • 5,008
  • 8
  • 47
  • 63
Konrad
  • 4,329
  • 10
  • 54
  • 88

2 Answers2

4

Chances are the cshtml file type is not recognized by TFS as a text kind, so the Annotate feature is disabled. To check that, go to your Team Project Source Control settings, in the File Types tab and look for the extension. If it's not there, add it and set it as a Text type and restart Visual Studio.

Nock
  • 6,561
  • 1
  • 28
  • 27
  • Where can I find this setting exactly? I tried context menu of my team project -> "Team Project collection settings" -> "Source Control Filey Types" ... there I added *.cshtml ... and restarted VST. Still no annotation for cshtml-files. Was I right or is there another location for this option? – Konrad May 03 '12 at 10:34
  • I just tried it on a versionned .cshtml file and I have the Annotate feature, so that's weird you don't have it... Are you sure the file is under source control ? – Nock May 03 '12 at 19:11
  • The file is under source control. I found the annotate feature in the solution explorer, right clicking on the file. But in the editor, I there is no "Annotate" item in the context menu as it is e.g. in cs-files ... Furthermore, the annotated file I open via "Annotate" in the solution explorer is not code highlighted, even it has the annotations at the lines. – Konrad May 04 '12 at 08:12
1

For me, if I right click inside the cshtml file editor and go to the Source Control sub-menu, then Annotate is not there. However, if I right click the file in the Solution Explorer and go to the Source Control sub-menu, then Annotate is there.

jausel
  • 594
  • 7
  • 18