ILearnable .Net

August 31, 2008

changing the class item template in VS2008

Filed under: Uncategorized — andreakn @ 03:53

It’s been bugging me for too long, every bloody time I go new -> class in VS2008,
I get a class that is not set to public. I usually don’t realize until I try to use the class at some later time.

Today I finally snapped and fixed it.

To change the template that is used to create new empty classes in VS2008,
– Go to 
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033
– unzip the
– change the class.cs file
– zip it back up and replace the original .zip file.

In yo face VS2008 default settings!!



  1. Nice. By editing the SimpleUnitTest template I can also get rid of all the crappy outcommented stuff.

    Comment by Erlend Oftedal — September 1, 2008 @ 01:40 | Reply

  2. As a note there seems to be a folder called “ItemTemplatesCache” (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache\CSharp\Code\1033) in which you also need to update for it to work, but I’m sure there’s another way of doing this.

    For those using the express editions, the files can be located here:

    [drive]:\[programs directory]\Microsoft Visual Web Developer 2008 Express\Common7\IDE\[express edition]\ItemTemplates\1033

    [drive]:\[programs directory]\Microsoft Visual Web Developer 2008 Express\Common7\IDE\[express edition]\ItemTemplatesCache\1033

    You can replace [express edition] with VCSExpress (Visual C# Express Edition), VWDExpress (Visual Web Developer Express) and so forth. The paths might also depend on which Edition you installed first, but you get the point.

    Comment by boomshanka — November 15, 2008 @ 01:15 | Reply

    • Excellent!

      Comment by andreakn — May 6, 2009 @ 08:13 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: