locked
Make item template show under "New test..." RRS feed

  • Question

  • I created a new visual studio item template that extends the Coded UI Test template. Then I deployed the template to Users\User\Visual Studio 2010\Templates\Item Templates\Visual C#\1033. The template shows up in the "New item..." dialog but not in the "New test..." dialog.

    Is there a way to make this work without having to deploy the item to the VS installdir and call devenv /InstallVSTemplates?

     

    EDIT: Got it working now. Instead of creating a new template I changed the CodedUITest.vstemplate.

    Tuesday, May 11, 2010 10:20 AM

Answers

  • Actually I'm still not quite sure which of the properties in .vstemplate is responsible for a template to show up under 'New Test...' but anyway here's what I did:

    I extracted <VSDIR>\Common7\IDE\ItemTemplate\CodedUITest.zip to a temporary folder.

    Then I changed all the relevant parts of CodedUITest.vstemplate like Name, Description, Icon and TemplateContent and added another WizardExtension.

    Renamed the files, compressed and deployed them to Users\User\Visual Studio 2010\Templates\Item Templates\Visual C#\1033.

    That's about it.

    Friday, May 14, 2010 6:51 AM
  • Glad I could help.

    I investigated a little further and found out that the element responsible for making an item template show under 'New Test...' is CustomDataSignature .

    So if you want your template as a test insert the following code to your.vstemplate:

    <CustomDataSignature>TestProject-V1</CustomDataSignature>

    Have a nice day!

     

    • Marked as answer by Chao Kuo Monday, May 17, 2010 2:46 AM
    Friday, May 14, 2010 12:09 PM

All replies

  • Hi,

    Glad to hear that your problem was resolved? Could you share the solution with us? This could benifit the members in this forum.

    Thanks

    Chao

     

    Thursday, May 13, 2010 1:42 PM
  • Actually I'm still not quite sure which of the properties in .vstemplate is responsible for a template to show up under 'New Test...' but anyway here's what I did:

    I extracted <VSDIR>\Common7\IDE\ItemTemplate\CodedUITest.zip to a temporary folder.

    Then I changed all the relevant parts of CodedUITest.vstemplate like Name, Description, Icon and TemplateContent and added another WizardExtension.

    Renamed the files, compressed and deployed them to Users\User\Visual Studio 2010\Templates\Item Templates\Visual C#\1033.

    That's about it.

    Friday, May 14, 2010 6:51 AM
  • Hi, Albert

    You are very clever.

    I have figured this for hours, but I failed to get the solution.

    Thanks hero!

    Chao

    Friday, May 14, 2010 8:28 AM
  • Glad I could help.

    I investigated a little further and found out that the element responsible for making an item template show under 'New Test...' is CustomDataSignature .

    So if you want your template as a test insert the following code to your.vstemplate:

    <CustomDataSignature>TestProject-V1</CustomDataSignature>

    Have a nice day!

     

    • Marked as answer by Chao Kuo Monday, May 17, 2010 2:46 AM
    Friday, May 14, 2010 12:09 PM