locked
VS2012 item template

    Question

  • Hi,

    has anybody else noticed your custom item templates wont show up when you go to add=>New Item.

    Or is there a trick :p?

    Thx

    Thursday, June 14, 2012 3:36 PM

All replies

  • Hi,

    We will look into this and report back with our Investigation. Also, if you can zip the custom item template and send it to me, it will be useful. You can send at navits at microsoft dot com.

    -Navit Saxena

    Thursday, June 14, 2012 7:43 PM
  • Hi Bjorn,

    Try setting that in the .vstemplate file under the TemplateData section:

    <TemplateGroupId>WinRT-Managed</TemplateGroupId>

    Then the template should appear under the Windows Metro style category, if it doesn't - make sure it is in the correct folder next to the other Metro style item templates for C#.

    Thank you,

    Ivan

    • Proposed as answer by navits - MSFT Tuesday, June 19, 2012 10:57 PM
    Tuesday, June 19, 2012 10:50 PM
  • Hi,

    I had the same issue. I found out that if you upgrade from a pre-release version to the release version, it retains the information in "C:\Users\username\Documents\Visual Studio 11", while most custom templates are installed to the Visual Studio 2012 folder. To fix this go to the Options dialog and go to the Projects and Solutions section. Under "User item templates location:", point it to "C:\Users\username\Documents\Visual Studio 2012\Templates\ItemTemplates". This fixed my problem.

    • Proposed as answer by Joseph Cauble Thursday, December 20, 2012 8:56 PM
    Thursday, December 20, 2012 8:44 PM
  • I have also been having the same problem.  I've been trying to add a new item template.  There are plenty of articles on the internet, but unfortunately, none of their solutions work for me. 

    I've tried running the following as administrator:
    - devenv /installvstemplates
    - devenv /resetsettings
    - devenv /setup

    I've tried moving the user templates and changing the user template path to C:\Templates. 

    I've tried duplicating the stock templates.

    I've tried replicating the TemplateContent and other settings exactly as exists for stock templates.

    No matter what I tried, VS2012 acts as if the templates don't existing.  Has anyone out there had any luck? 

    Friday, May 31, 2013 7:58 PM
  • Hi Bjorn,

    Try setting that in the .vstemplate file under the TemplateData section:

    <TemplateGroupId>WinRT-Managed</TemplateGroupId>

    Then the template should appear under the Windows Metro style category, if it doesn't - make sure it is in the correct folder next to the other Metro style item templates for C#.

    Thank you,

    Ivan

    Ivan,

    Thanks for the post.  This actually did not work for me, but did lead me to the solution.  What I had to add was the following: 

        <TemplateID>Microsoft.CSharp.Class</TemplateID>

    This is not added when doing an export. As near as I can tell, the export
    function is useless. I also don't see any useful documentation to explain
    the behavior or possible settings even in the scheme reference. Regardless,
    at least I now have an option.

    • Proposed as answer by EDeCesare Friday, May 31, 2013 8:22 PM
    Friday, May 31, 2013 8:22 PM