Geeks With Blogs
Hannes Pavelka It isn't rocket science. Well, unless of course you're NASA

If you add a new item to your project, Visual Studio applies a default template which is responsible for creating the sceleton of the selected item.

It might come in handy to modify the default "create new item" behaviour and customize it so it fits your individual needs. The process to do so is pretty straightforward. All templates are stored in a folder called ItemTemplateCache. If you e.g. want to modify the default template for "Add new class" you need to modify the Class.cs which is located: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesCache\CSharp\1033\Class.cs

You don’t have to worry about messing things up, you can always restore the item templates with the devenv /installvstemplates command. It copies the item from zip files located at

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplates\CSharp\1033\Class.zip.

You can ofcourse make more permanent changes, by modify the content of the zip file itself.

Posted on Friday, November 24, 2006 3:01 AM | Back to top


Comments on this post: Modify Visual Studio 2005 default new class template

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Hannes Pavelka | Powered by: GeeksWithBlogs.net