I frequently work with the System.IO namespace. Is there a way to have that be included with each new project I create?
Thanks
Adding it to the default template might be tricky, I would leave it alone.
You can easily create an empty project, make all sorts of settings and modifications and save it a s a new template (File|Export as template). A lot safer in the long run.
Just make it a habit of starting your new projects from your own custom templates.
If you really want to you can edit the contents of the file that is usually at c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\WindowsApplication.zip
Check out Changing the default using directives in Visual Studio.
The basic answer is to modify the class.zip file located here (for various options):
Visual Studio 2008
For 64 bit:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class.zip
For 32 bit:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class.zip Visual Studio 2010
For 64 bit:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class.zip
For 32 bit:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class.zip
And then run devenv.exe /installvstemplates
in one of the following locations:
Visual Studio 2008 64-bit
cd C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\
32-bit
cd C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
Visual Studio 2010 64-bit
cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\
32-bit
cd C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\
A more complete answer is here and here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With