views:

81

answers:

2

Small pet peev. When creating new visual studio projects is there any way to include the system.configuration assembly by default? Almost all of my new projects will need access to the configuration AppSettings.

I know it's not much effort to do Project > Add reference, but I imagine that this is a very very common thing for most people and wondered why it's not included by default?

+5  A: 

You can do this by creating your own project template that includes a reference to System.Configuration.dll. Here is a link that has a walk through on how to do this

As to why the behavior is what it is today, I don't think you'll find a solid answer about that.

JaredPar
+1 Beat me to it.
Tim
Thanks. But any ideas why it's not in the default templates? Something Microsoft thought is not common?
Fixer
@Fixer, that's the part I don't think you'll find a solid answer on. It was a choice made ~8 years ago and likely hasn't been revisited since then.
JaredPar
ok fair enough - at least it can be customized!
Fixer
+1  A: 

You can customize your own template:

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

Note that this link is old, but I don't imagine things have changed much.

EDIT: you can follow a similar methodology for file templating as well, i.e. you can customize the standard c# class file layout, user/custom control templates, etc. I have used this to customize which using statements are included by default, and to insert default comment blocks at the top of the file.

EDIT: this assembly is included by default in VS 2010 web applications, so perhaps it was just an oversight, or someone was overzealous in their attempts to be minimalist.

Tim