Search code examples
visual-studio-2015vsixvisual-studio-templates

Visual Studio Template - Adding to Custom Group


I have created a Visual Studio Template that is delivered as an Extension (VSIX). I have used Visual Studio 2015 - Enterprise.

Within Visual Studio, when I go to 'New Project' my custom template is a child to the 'Visual C#' node. But I would like to host the template in a custom group, the structure would be Visual C# \ MyTemplateGroup \ ...

I am struggling in getting this to work. I have tried setting the in the vstemplate, but this fails.

The only success I have had is actually unzipping the VSIX file and changing the project subfolder from 1033 to 'MyTemplateGroup' But to be honest this is a bit of a hack.

Thanks


Solution

    1. Select the .vstemplate file that corresponds to your template in the solution explorer.
    2. In the properties window, set the Category property.

    This property is available if the project that contains the template is an extensibility project (project type guid 82b43b9b-a64c-4715-b499-d71e9ca2bd60).

    If you check the .vstemplate file inside the csproj, you will notice that a element named OutputSubPath will be added, like in this example:

      <ItemGroup>
        <VSTemplate Include="Module.vstemplate">
          <SubType>Designer</SubType>
          <OutputSubPath>ELEVATION</OutputSubPath>
        </VSTemplate>
      </ItemGroup>