locked
Annotate source code of MVC Views in Visual Studio editor using Power Tools

    Question

  • Hi,

    I use Visual Studio 2010 in combination with the Team Foundation Server 2010 and the Power Tools. In my code files (e.g., .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. But 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? Or how can I enable this very useful function for all text-based file types in Visual Studio?

    Thanks :-)

    Konrad

    • Moved by lucy-liu Thursday, May 03, 2012 8:14 AM it is a tfs power tool issue (From:Visual Studio Editor)
    Wednesday, May 02, 2012 11:55 AM

Answers

  • Hello KonradMD,

    I am sorry that I do not have the same issue as yours on my side. If I open the .cshtml file in the editor, I can have the Annotate node shown under the Source Control node just as the screenshot you posted above.

    And if you use another VS to connect to the TFS server, will you get the same result? I think that there may be some settings in the VS which causes this kind of issue. Please also try to reset VS settings to see if it helps: in the VS->Tools->Import and Export Settings->Reset all settings.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by KonradMD Wednesday, May 16, 2012 6:53 AM
    Monday, May 07, 2012 7:58 AM

All replies

  • Hi KonradMD,

    This is a TFS Power Tools issue. I will move it to Team Foundation Server – Power Tools & Add-ons forum for a better support.

    Thank you for your understanding!


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 03, 2012 8:14 AM
  • Hello Konrad,

    I do not think there is any file type limitations for the TFS Power Tool Annotate feature. I did a test on my side, and the the Annotate feature works fine for the .cshtml file. Please see the following screenshot:

    And to deal with your issue, please first make sure that you have checked in the .cshtml files to TFS version control successfully. Otherwise, you will get the Annotate node grayed out.

    In addition, you can also use annotate command to display information about who changed each line in a file and when each change was made: tfpt annotate filespec[;versionspec] [/noprompt]

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    Friday, May 04, 2012 4:57 AM
  • Thank you for your answer.

    But this is weird: I can access the "Annotate"-Feature directly from the "Solution Explorer" right clicking the file as you did.

    But in the editor, right clicking, it works for cs-files etc. but not for .cshtml.

    The menu entry just doesn't exist.

    And if I call the Annotate-Feature via Solution Explorer, it opened the file with annotations, but not with code highlighting.

    Calling "Annotate" directly in the editor window in a cs-File:

    Friday, May 04, 2012 6:42 AM
  • Hello KonradMD,

    I am sorry that I do not have the same issue as yours on my side. If I open the .cshtml file in the editor, I can have the Annotate node shown under the Source Control node just as the screenshot you posted above.

    And if you use another VS to connect to the TFS server, will you get the same result? I think that there may be some settings in the VS which causes this kind of issue. Please also try to reset VS settings to see if it helps: in the VS->Tools->Import and Export Settings->Reset all settings.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by KonradMD Wednesday, May 16, 2012 6:53 AM
    Monday, May 07, 2012 7:58 AM