.NET · C# · Visual Studio

Updating Visual Studio 2013 default Class.cs template

This is a Jeanious Note, a note I keep for myself and share with the Internet. I hope this helps someone else too. 🙂

A few days ago I was frustrated after a code review revealed that I had again forgotten to put the copyright information at the top of a new cs file.  I knew there had to be a way to update the the VS2013 template for a new class.cs file so that I can have the copyright just be there when I create a new class.cs.  After some searching on the internet I couldn’t find the exact solution for modifying a VS2013 template.  Ok I could find the location of the Class.cs template for VS 2013 but there was information for the location of the Class.cs template for VS2010 & VS2012.  Updating the VS2013 Class.cs template should be much different than in previous versions of Visual Studio.  As it turns out as of VS 2012 you can edit the Class.cs and not have to deal with the all the extra steps in pervious version of Visual Studio.  The “hard” part was that non of the posts I found had the location of the Class.cs template for a VS2013. Here’s the location if you use the default install location:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class\Class.cs

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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