I've been working on my own code generation tool and enterprise framework for .NET for nearly two years.
I found CodeSmith the other day, haven't had a close look, but I intend to. Of course, most tools are moot since I have my own! ;)
John.