Using a Generator Project from Command-Line

A CodeSmith Generator project contains everything needed to run even the most complicated code generation. That means you can generate it from a batch file, a command prompt, or any application that can start a process with arguments.

To generate a project's outputs, pass the project file to the console application, cs.exe:

cs.exe MyProject.csp

To override a property value in the project, add a /property (or /p) switch:

cs.exe MyProject.csp /p:ClassNamespace=MyCompany.Data

For every switch, such as /verbose and /debug, see Console application usage.