Chapter 15Project and Item Templates

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionalvisualstudio2015 on the Download Code tab. The code and any related support files are located in their own folder for this chapter.

Most development teams build a set of standards that specify how they build applications. This means that every time you start a new project or add an item to an existing project, you have to go through a process to ensure that it conforms to the standard. Visual Studio 2015 enables you to create templates that can be reused without having to modify the standard item templates that ship with Visual Studio 2015. This chapter describes how you can create simple templates and then extend them with a wizard that can change how the project is generated using the IWizard interface.

Creating Templates

Two types of templates exist: those that create new project items and those that create entire projects. Both types of templates essentially have the same structure, as you'll see later, except that they are placed in different template folders. The project templates appear in the New Project dialog, whereas the item templates appear in the Add New Item dialog.

Item Template

Although you can build a project item template manually, it is much quicker ...

Get Professional Visual Studio 2015 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.