The CodeSmith Generator Tutorial includes the following various sections which will quickly help you become a master of Code Generation.
Working with CodeSmith Generator
Although Although there's a lot of depth to CodeSmith Generator, you can get started with it quickly. In this section of the documentation, we'll walk you through a few common code generation scenarios in this section.
Getting Started
The best way to understand the power of CodeSmith Generator is to try it out. Although CodeSmith Generator has many advanced features, you can begin using it to help produce code without mastering all of those features. In this section, you'll learn how to use Generator to generate a useful piece of utility code - specifically, a strongly-typed hash table class.
...