Posts

Showing posts from May, 2013

Edit Default Visual Studio 2012 Item and Project Templates

After adding a new file or project within a Visual Studio solution there are certain settings that I always update.  Follow the steps below to edit the default templates so these settings become the default.

Visual Studio 2012 Project and Item Template files are located here:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates


Add "public" to all new C# class files:
Edit the Class.cs file by adding the word "public" in front of the word "class"

The Class.cs can be found here:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class\Class.cs

After you're done, it should look like this:
using System; using System.Collections.Generic; $if$ ($targetframeworkversion$ >= 3.5)using System.Linq; $endif$using System.Text; $if$ ($targetframeworkversion$ >= 4.5)using System.Threading.Tasks; $endif$ namespace …