0

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

1 Answers1

2
  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>
  • It works by just assigning the category property of the vstemplate to the name you want to give to your custom location in the add new project dialog. the other information doesn't seem to be correct for my case. Nothing got added in my csproj file. cheers though! – Erik May 19 '17 at 14:14
  • I need to create a new node in the same level as 'Visual C#' node. any idea how to do this? – Ashwath Jun 06 '17 at 09:43
  • I know of a VS extension that does that but I'm not sure how. May be you can find it in their source code: [WiX Toolset VS2017 Extensions](https://github.com/wixtoolset/VisualStudioExtension) – Hugo Quintela Ribeiro Jun 09 '17 at 16:19