Until around a year ago, I was an advocate of code generation via CodeSmith. Having marginal "success" with it in the 4 years I advocated for it, I'm now of a different opinion.
Code generators, such as CodeSmith, are automated overproduction machines that require prior overproduction, in the form of schema, to be used
Micro code generators like as Resharper, are much closer to JIT machines when lined up in one-piece-flow processes, such as Test Driven Development
...
If you had told me, 2 years ago, that I would make these statements today, I probably would have laughed at you. 