c#: Ways to make use of 'using' directives less tedious.
Good programming practice these days tends to mean splitting your stuff up into lots of assemblies and namespaces (eg see [S#arp Architecture][1], [MVC][2], etc). However a side-effect of that is that you have to stick a whole bunch of 'using <namespace>' directives into every class file. You know the sort of thing: Every controller class needs to 'use' the models and viewmodels namespaces, etc etc.

Are there any techniques for making this easier? e.g. is it possible to declare `using` directives at the namespace level instead of the file level - so that every class in a namespace 'foo' automatically is using namespace 'bar'? Or are there smart ways of setting the default 'usings' that Visual Studio adds, based on the folder you are in? Or other ways of making the adding of 'usings' less tedious?


  [1]: http://www.sharparchitecture.net/
  [2]: http://www.asp.net/mvc
c#: Ways to make use of 'using' directives less tedious.
===

Good programming practice these days tends to mean splitting your stuff up into lots of assemblies and namespaces (eg see [S#arp Architecture][1], [MVC][2], etc). However a side-effect of that is that you have to stick a whole bunch of 'using <namespace>' directives into every class file. You know the sort of thing: Every controller class needs to 'use' the models and viewmodels namespaces, etc etc.

Are there any techniques for making this easier? e.g. is it possible to declare `using` directives at the namespace level instead of the file level - so that every class in a namespace 'foo' automatically is using namespace 'bar'? Or are there smart ways of setting the default 'usings' that Visual Studio adds, based on the folder you are in? Or other ways of making the adding of 'usings' less tedious?


  [1]: http://www.sharparchitecture.net/
  [2]: http://www.asp.net/mvc