views:

104

answers:

4

I have Visual Studio 2008 and I find myself constantly adding the same 3 or 4 using statements with every file I create.... Is there a way that I can define these somewhere in VS so every time I create a file this standard set of includes are added?

+3  A: 

You can do it by editing Visual Studio Item templates.

More information here

muerte
+5  A: 

You can create a template that matches what you want, as per

http://msdn.microsoft.com/en-us/magazine/cc188697.aspx

Rich
A: 

If you want to change the built-in templates that come with Visual Studio, rather than creating your own derivitives, you can try updating the files that live around C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates (though you may also need to update the ItemTemplatesCache folder for the changes to be picked up immediately).

bdukes
A: 

This doesn't answer your question directly, but you should take a look at ReSharper. It is a great tool for all kinds of reasons. But one thing it does in particular is add (and remove) all those using directives for you automatically, so you don't have to even think about it.

jeremcc