Exporting project items
Visual Studio is not limited to only working with entire projects when it comes to template support. If you only want a couple of files then simply choose the Item template option from the same Export Template Wizard dialog instead of Project template, as shown here:
The remainder of the item template experience parallels the procedures we just followed for project templates. One key difference is that, to import your template's .zip
file, place it in the ItemTemplates
directory instead of the ProjectTemplates
directory, as illustrated in the following code snippet:
C:\Users\<your username>\Documents\Visual Studio 2019\Templates\ItemTemplates
The other key difference is that you will be prompted to choose references that must be included for your item template to work:
You have now seen how to export...