Welcome to CodeSmith Generator
CodeSmith Generator is a template-based code generator that produces code for any text-based language. Whether your target is C#, Visual Basic, T-SQL, Java or even FORTRAN, Generator helps you write higher-quality, more consistent code in less time than writing it by hand.
At its core, Generator combines templates with metadata. A template describes the code you want; metadata (values you enter, a database table, an XML file, .NET types) fills in the details each time you generate.
Generator's template syntax is based on ASP.NET, so you can write your first templates within minutes of installing. Generator also ships with a set of sample templates for common tasks such as creating stored procedures and documenting a database.
Main features
- A familiar template language. The template syntax is similar to ASP.NET.
- Template Explorer. A simple user interface for organizing templates and generating code quickly.
- Template Editor. A complete development environment for writing and testing templates.
- Visual Studio integration. Execute and manage code generation inside Visual Studio, including Generator projects and ActiveSnippets.
- Automation. Generate from Generator projects, the console application or the MSBuild task as part of your automated build.
- Flexible metadata. Metadata sources include .NET types, databases through the SchemaExplorer API, XML, and your own custom metadata sources.
- Merging. Merge strategies combine generated code with your custom code.
- Debugging. Debug your templates interactively to track down errors.
- An object model. Templates interact directly with the Generator engine, and the Generator API lets you run templates from your own code.
For a feature comparison by edition, see Editions. The CodeSmith Generator product page has more detail.
Next steps
- Getting started? Check the system requirements, install Generator, then follow the tutorials.
- Already writing templates? Go straight to Writing templates.