I'd like to inherit all my controllers from a custom base class that I write myself. I can change the line every time I add a new controller, but it would be nicer if I could somewhere specify the default value that gets set there. That way I wouldn't need to worry about forgetting this, and other people who get added to the project later on would have an easier time.
Is there any way to achieve this?
You can customize the T4 template that gets used when the Add Controller action gets invoked. Basically you would have to copy the template from
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 3\CodeTemplates\AddController\Controller.tt
to '~\CodeTemplates\AddController\Controller.tt` in your project file.More info available here (scroll down to "Adding and Customizing Scaffold Templates")