Did you know… You can create project templates? - #336
Starting in Visual Studio 2005, you can create your own custom project templates to appear alongside the VS-installed project templates.
First, you’ll want to create a new project and set it up exactly like you want it to appear when you do File – New – Project – <ProjectTemplate>. In the example below, I created a VB Console Application using two references and some placeholder function calls and comments in the one file.
You can go to File – Export Template to bring up the Export Templates wizard. Since this is about Project Template, keep the default Project option selected. If you have multiple projects in your solution, you can select which one to use from the combo box drop down.
On the next page, you change the default options for your project, which I’ll go over into detail over the next week.
Some basics before we leave here today:
- The project templates you create will be saved in Documents\Visual Studio 2008\My Exported Templates
- The template is just a .zip file that contains the associated files with your project and the <filename>.vstemplate file (a .xml file) representing any metadata and how the files should be coordinated
And, if you use the exact defaults, the result is your project template in the New Project Dialog under the root folder for that language:
but more customization tips to follow!