Visual Studio 2013/2015 C++ Item Templates Missing

Viewed 4262

I am trying to make some simple Item Templates for Visual Studio 2013 (Professional) C++ projects, but Visual Studio seems to be fighting with me. I started using the File -> Export Template... wizard, which completed and generated a zip file, but alas, the new template was nowhere to be seen on the Add New Item dialog, so I started manually editing it to see if I could fix it.

Here is my test .vstemplate file:

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
  <TemplateData>
    <DefaultName>test</DefaultName>
    <Name>Test</Name>
    <Description>Test item template.</Description>
    <ProjectType>VC</ProjectType>
    <!--<SortOrder>10</SortOrder>-->
    <Icon>icon.ico</Icon>
  </TemplateData>
  <TemplateContent>
    <ProjectItem TargetFileName="$fileinputname$.h" ReplaceParameters="true">test.h</ProjectItem>
  </TemplateContent>
</VSTemplate>

I've tried using both VC and VisualC for <ProjectType> and placing the template in various folders, in both zipped and expanded forms.

After changing <ProjectType> to CSharp and creating a C# project it shows up immediately. Interestingly, if the %USERPROFILE%\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual C# directory is empty, the template will now show up if it is in %USERPROFILE%\Documents\Visual Studio 2013\Templates\ItemTemplates or %USERPROFILE%\Documents\Visual Studio 2013\Templates\ItemTemplates\Visual C++ Project directories, but if a copy of it is also in the Visual C# directory it shows up twice in the new item dialog...

I know there was a bug with the Visual Studio 2013 Express RC where the New Item dialog wouldn't show any templates at all, even the built-in ones, so I'm thinking this might be a bug in Visual Studio, or just another example of Microsoft's disturbing disregard for C++.

Is there something I'm missing here or is this a bug with VS2013? If so does anyone know of any workaround?

Edit: This problem still exists in Visual Studio 2015 RC

2 Answers
Related