Roll Your Own Project Template with the Export Template Wizard
Menu: File -> Export Template
Command: File.ExportTemplate
Versions: 2008,2010
Published: 2/22/2010
Code: vstipProj0004
Are you always adding the same extra files to project templates? Ever just wish you could have it all just "be" there? Well you can with the Export Template Wizard! It slices, it dices, er.okay it just makes templates but it really rocks! How do you use it? Just set up an existing project template the way you want it. In this example, I always want a larry, curly, and moe class files with my console apps:
Now go to File -> Export Template. (NOTE: it will prompt you to save changes if you haven't already)
You get the Export Template Wizard. The first screen is where you choose to make a Project or Item template:
I selected "Project template" for this example then clicked on "Next >" to get this dialog:
Pay particular attention to the two choices at the bottom: "Automatically import the template into Visual Studio" and "Display an explorer window on the output files folder".
Clicking "Finish" opens up my Exported Templates (output) folder:
And when I go to create a new application, I see this in the dialog:
And there you go: instant template!
Obviously there is lot more you can do and I would suggest starting here for more information on how to leverage this feature:
https://msdn.microsoft.com/en-us/library/ms185318.aspx
Comments
Anonymous
February 22, 2010
This option also exists in VS 2005.Anonymous
February 22, 2010
Daniel, Yep it goes back pretty far if memory serves but I'm only addressing VS2008 and VS2010 for the blog posts. Although I am still very seriously considering VS2005 info if we do a book. Z