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

C# Templates for Visual Studio 2003

, 18 Oct 2005
Rate this:
Please Sign up or sign in to vote.
This article contains new templates for Form, Control and Class creation in C# which are more compactly formatted. It also gives an idea of how to edit the templates yourself.
Sample Image - VSTemplates1.png

Introduction

All information in this article refers to Visual Studio 2003. Sorry, I don't have Visual Studio 2002 anymore, but I believe its template system is pretty much similar to Visual Studio 2003.

When I first began to code in Visual Studio in 2002, I loved it from the first sight. Its IDE is comfortable and productive and you quickly get used to it. It has, however, some minor inconveniences, for me at least. One of them is a verbose and bulky designer auto generated code.

One day, after straightening up the auto generated code for the nth time, I've finally decided to do something about it. It appeared to be very easy. So I have corrected the templates, which I use most often, namely Form, User Control, Custom Control and Class. And after using them for over a year, I decided to share the templates set with the guys who, like me, do not like standard templates, but who haven't yet lost their patience enough to do something about it. Smile | :)

Installation

If you have the default installation path for Visual Studio, you will find the templates lying in C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\VC#Wizards directory.

I have packed the template files with all the directory structure up to Microsoft Visual Studio .NET 2003. So you have to unpack the VSTemplates_set.zip file to current directory. It will create a directory called Microsoft Visual Studio .NET 2003. Copy this dir to C:\Program Files. You will be asked to overwrite some files. Agree. Do this is at your own risk, although there is hardly any risk at all. Backup VC#Wizards directory if you want to save your old templates.

After that, if you will start a new project or add a new form or class to an existing project, you will have all auto generated code neatly packed in one region, leaving only the constructor outside.
I am working with new templates for over a year, and I have given them to a couple of friends, and so far no problem has occurred.

If you don't like my templates either, you will at least have the idea where to search for them and you can always edit them as you want them to be.

Further Reading

Surfing through The Code Project after submitting the article, I found that there are a lot of more detailed and profound articles on Visual Studio templates customization. Still this article can be a good starter and should you require further information, just follow the links below:

License

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

About the Author

miklovan
Web Developer
Russian Federation Russian Federation
No Biography provided

Comments and Discussions

 
GeneralError: file not found when download template Pinmembernguyen hoang minh13-Oct-05 5:25 
GeneralRe: Error: file not found when download template Pinmembermiklovan13-Oct-05 16:30 
GeneralRe: Error: file not found when download template Pinmembermiklovan13-Oct-05 16:42 

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
Web01 | 2.8.140718.1 | Last Updated 19 Oct 2005
Article Copyright 2005 by miklovan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid