- VS2013 (VS2010 and other versions also apply, both need to install the visual Studio SDK)
Understanding the meaning of the default path
- 1
By default, the default build path for project templates is: ... \projecttemplates\csharp\1033\mytemplate.zip
ProjectTemplate: Determined by the type of template file Type= "Project", if it is an item template, it is generated in the ItemTemplates folder.
CSharp: Determined by the project type ProjectType property.
1033: The LCID of the template, the LCID in the English environment is 1033, which is also the default value if you want to modify the LCID (as in Japanese 1041)
- 2
To add a group (folder) to the template in the New Project dialog box, the path must be: ... \projecttemplates\csharp\{group name}\1033\***.zip
You can do this by modifying the folder relationship in the extension file VSIX, opening the extension file as a compressed file, and adding a parent directory for 1033. Or, change the VSIX extension file to a zip file, unzip it, add a custom directory, then compress it into a zip file, and then make changes to the VSIX extension.
However, this experience fundamentally solves the problem of template grouping.
END
How do I add a group to a custom template?
-
Unload the template project.
Right-click the template project and select Unload Project from the right-click menu.
-
Right-click the Unload template project and open its project file.
-
Add the Outputsubpath property for the VSTemplate node. After saving, reload the project (select Unload Project, right-click menu to reload the project).
-
You can see the effect by compiling the template project. Rebuild the VSIX extension project to see the effect after installation.
-
VS Custom Project Template: [4] Grouping of custom templates