I've used CodeSmith on a few projects and really liked the results. Since you are just working with templates you have complete control over the code that is generated. Just make sure you only work with the templates and never customize any of the code that is generated. I generated a simple data access layer and then later on added performance monitoring support to the template, just regened the dal for all the projects and it was added to all of them. Don't get me wrong, I could have done the same thing with a common base class and the right abstraction. However, I would have needed a good interface and design on the first try, which I probably would have made overly general or not the correct abstraction for this enhancement.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon