Changing the default using directives in Visual Studio
The other day I was working on a demonstrator application for the Object Builder framework, and adding a lot of new classes to my project. Having to manually add using directives for OB in every class didn't seem terribly efficient, so I set about finding how you can change the default C# class template. I discovered this nugget in Anson Horton's blog - if you open %Program Files%\Microsoft Visual Studio 8\Common7\IDE\ItemTemplates\CSharp\1033\Class.zip, you can modify the class.cs file within that's used to generate all new C# source files - it looks like this:
using System;
using System.Collections.Generic;
using System.Text;
namespace $rootnamespace$
{
class $safeitemrootname$
{
}
}
You can then add or remove the using directives you want at the top of this file, and save it back to the archive. Finally run %Program Files%\Microsoft Visual Studio 8\Common7\IDE\devenv.exe /setup to refresh Visual Studio's template cache. Now all new C# files you create should match your modified template.