By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,967 Members | 815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,967 IT Pros & Developers. It's quick & easy.

Changing the VS 2003 Templates

P: n/a
Is it possible to change the default templates in VS 2003?

Everytime I start a new web method project I have to include a ton of
version control headers and region tags. It would be handy to be able
to alter the default templates to include all of this stuff so I don't
have to each time.

Thanks.
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Greg,

Yes, it is possible. For VS.NET 2003, there is a directory under the
IDE that has a file, "Class1.cs". This file is a template that is used in
conjunction with other files (there is a common.js file which sets up
variables I believe) to generate the new files when you select new items.

Unfortunately, I can't remember where the directory is, as I've
uninstalled VS.NET 2003, in favor of VS.NET 2005. The structure is
different in VS.NET 2005, so I can't reference my current installation.

From what I remember, it would be under:

<Program Files>\Microsoft Visual Studio .NET 2003\VC#\CSharpProjectItems

And then there would be a directory with the Class1.cs file in there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Greg Merideth" <be*****@forwardtechnology.net> wrote in message
news:TY********************@comcast.com...
Is it possible to change the default templates in VS 2003?

Everytime I start a new web method project I have to include a ton of
version control headers and region tags. It would be handy to be able to
alter the default templates to include all of this stuff so I don't have
to each time.

Thanks.

Nov 16 '05 #2

P: n/a
Found it, wasn't in the folder but it at least showed me where to look.

It's all the way down in:

<Program Files>\Microsoft Visual Studio .NET
2003\VC#\VC#Wizards\CSharpWebServiceWiz\Templates\ 1033

Thanks. This will save me many hours of cutting and pasting. I've got
some work ahead of me in the beta vs 2005, I'll check the folders in
there as well.

I figured something like this would be part of the VS environment to be
able to change the templates easily.

Nicholas Paldino [.NET/C# MVP] wrote:
Greg,

Yes, it is possible. For VS.NET 2003, there is a directory under the
IDE that has a file, "Class1.cs". This file is a template that is used in
conjunction with other files (there is a common.js file which sets up
variables I believe) to generate the new files when you select new items.

Unfortunately, I can't remember where the directory is, as I've
uninstalled VS.NET 2003, in favor of VS.NET 2005. The structure is
different in VS.NET 2005, so I can't reference my current installation.

From what I remember, it would be under:

<Program Files>\Microsoft Visual Studio .NET 2003\VC#\CSharpProjectItems

And then there would be a directory with the Class1.cs file in there.

Hope this helps.

Nov 16 '05 #3

P: n/a
Greg,

In VS.NET 2005, I wouldn't recommend changing the templates in this
manner. There is a much more robust system which allows you to tweak and
modify your own types. There should be a few articles on this on MSDN on
how to do this.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Greg Merideth" <be*****@forwardtechnology.net> wrote in message
news:et********************@comcast.com...
Found it, wasn't in the folder but it at least showed me where to look.

It's all the way down in:

<Program Files>\Microsoft Visual Studio .NET
2003\VC#\VC#Wizards\CSharpWebServiceWiz\Templates\ 1033

Thanks. This will save me many hours of cutting and pasting. I've got
some work ahead of me in the beta vs 2005, I'll check the folders in there
as well.

I figured something like this would be part of the VS environment to be
able to change the templates easily.

Nicholas Paldino [.NET/C# MVP] wrote:
Greg,

Yes, it is possible. For VS.NET 2003, there is a directory under the
IDE that has a file, "Class1.cs". This file is a template that is used
in conjunction with other files (there is a common.js file which sets up
variables I believe) to generate the new files when you select new items.

Unfortunately, I can't remember where the directory is, as I've
uninstalled VS.NET 2003, in favor of VS.NET 2005. The structure is
different in VS.NET 2005, so I can't reference my current installation.

From what I remember, it would be under:

<Program Files>\Microsoft Visual Studio .NET 2003\VC#\CSharpProjectItems

And then there would be a directory with the Class1.cs file in there.

Hope this helps.


Nov 16 '05 #4

P: n/a
Greg Merideth wrote:
Found it, wasn't in the folder but it at least showed me where to look.

It's all the way down in:

<snip>

I have added things to the template script files that also add a
timestamp to the file when added to the project. Let me know if you want
a copy of the code.

--
Lasse Vågsæther Karlsen
http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x0270466B
Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.