Generate code from a sample template

The best way to understand CodeSmith Generator is to try it. You don't need to master its advanced features to start producing useful code. In this tutorial, you use Generator to generate a piece of everyday C# code: a custom exception class, complete with constructors, serialization support and typed properties for extra error details.

It takes about five minutes, and introduces you to Template Explorer and Generator's template-based approach to code generation.

Steps

  1. Launch Template Explorer
  2. Open a template
  3. Set properties
  4. Generate code
  5. Inspect the template
  6. Where to go from here

Next: Launch Template Explorer