Click here to Skip to main content
Click here to Skip to main content

Write Templates for Visual Studio 2010

, 21 Jun 2010
Rate this:
Please Sign up or sign in to vote.
A presentation about Visual Studio item and project templates - how they make you more productive, how to create and deploy them.

Title Slide

Introduction

This article is part of my series on Visual Studio Extensions. Before you read it, please read the Introduction. It tells you the purpose of the series and gives you some tips on presenting my material. This article is designed to give you what you need to deliver a successful presentation. The speaker notes and demo script, along with the videos, are part of the package, and you won't learn everything from just the text of the article. My goal is to increase developer awareness of Visual Studio Extensions by making it easy for anyone to deliver a presentation on them at a user group, code camp, or the like.

Developers use project and item templates almost every day - creating new projects and adding items to existing projects. If they think about how those templates came to be, they probably assume it's a very difficult task suitable only for experienced developers, perhaps those on the Visual Studio team. This presentation aims to show that the very opposite is true. Anyone can create a project or item template. Whether it's to use yourself, to share with the team, or to share with the wider community, template creation is so quick and easy that you will save back the creation time the very first time you use it.

Presenting this session

This is a 300 level session for people who are comfortable with Visual Studio and have created plenty of projects. There are three demos, and because they have strong similarities, you need to work to keep it all straight for your attendees. I've recorded the demos and included links to them here so that you can see how it's all done. Once you know how to do these demos, you'll find the slides very easy to talk to since many of them just recap information from the demos. I do have speaker notes indicating what you can say to each slide. The demos take about half of a 75 minute slot, so you will have some time to talk to the slides.

Demo 1 - Item Template

This demo has a simple text file with boilerplate text in it that you might want to add as a new item to a variety of projects. You don't have to write any code, but you do have to drag things in and out of zip files and not get lost in a set of folders with very similar names. It's 9 minutes long.

Demo 2 - Project Template

Here, we make a project template from a project that has had a little customization applied. Like the item template, it's deployed by copying the zip to a magic folder, but towards the end, you can see that this approach is really a little fragile. This sets us up for the final demo. It's 13 minutes long, so I had to split it into two parts to upload.

Demo 3 - Deploying the Template

This demo continues from the previous one by showing how to deploy that template in a much safer and more robust way. It relies on an extension from Microsoft that simplifies building a VSIX dramatically. In fact, creating and using the VSIX is so simple you might miss it. This demo starts with showing you the gallery, then installs the extension right from inside Visual Studio. In no time, we re-export the template as a VSIX this time, and use it. Then, to round out the package, we put an icon, preview, and welcome page into the VSIX too. This is something everyone should do when they make a template. It's almost 16 minutes long, so I had to split it into two parts to upload.

Speaker Tips

Your goal for people leaving this session is that they see how simple it is to export a template and will create some of their own item and project templates to use in the immediate future. Some of them should also be planning to share those templates with team members. As well, if the Visual Studio Gallery is new to any attendees, they should be impressed by how easy it is to install useful extensions, and ready to take a look around and find some that they might like.

The Notes

Remember, you don't have to learn these just from the videos. There are detailed speaker notes and a demo script for you in the downloads for this article.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

KateGregory

Canada Canada
No Biography provided

Comments and Discussions

 
GeneralMy vote of 5 Pinmemberkuanyong26-Nov-12 16:16 
GeneralMy vote of 1 [modified] PinmemberArnaud Dovi2-May-12 5:34 
QuestionCan VSIX do what vstemplate can? PinmemberEric Wahner8-Mar-12 4:47 
GeneralExcellent work and fantastic high quality videos! PinmemberFrank Heimes1-Jul-11 23:23 
QuestionC++ Project Templates PinmemberKerem Kat22-Jun-11 8:23 
GeneralA project template bug Pinmemberjmertus30-Jan-11 2:27 
GeneralCreate project dialog Pinmemberjhegedus28-Nov-10 15:22 
GeneralRe: Create project dialog Pinmemberjhegedus28-Nov-10 15:23 
GeneralGreat tutorial! PinmemberJalla Tjalabais30-Jul-10 2:15 
GeneralRe: Great tutorial! PinmemberKateGregory30-Jul-10 2:22 
GeneralRe: Great tutorial! PinmemberJalla Tjalabais30-Jul-10 2:38 
GeneralRe: Great tutorial! Pinmemberdeadlydog26-Aug-11 7:33 
GeneralThanks Pinmemberdevnet24721-Jun-10 19:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 21 Jun 2010
Article Copyright 2010 by KateGregory
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid