-[-[[-When you need to generate multiple files as part of a single code-generation process, consider using one sub-template for each file. Call the sub-templates from a master template and use the RenderToFile method to output each sub-template.
To generate multiple output files as part of an automated process, you can use the CodeSmith Generator Project support from the console or MSBuild.
You can drag and drop a template from CodeSmith Explorer or from the Template Explorer window in CodeSmith Studio to any application that supports dropping text (including Visual Studio .NET). When you drop the template, CodeSmith will display the template's property sheet. Fill in the metadata for the template, click the Generate button, and the template's output will be rendered directly to the application where you dropped the template.
The new XmlPropertydirective gives you a strongly-typed object model and statement completion for metadata stored in XML files.
You can mix your own custom code with generated code by employing one of several different active generation strategies.
If you're generating SQL Scripts, CodeSmith can execute the scripts for you immediately after generating them.
Use merge strategies to preserve custom code while regenerating from templates as part of an automated build process.
Use Ctrl+Shift+M in CodeSmith Studio to collapse all template code blocks. This is useful to quickly see all static template content.
Use the StoredProcedures.cst template to generate standard create, retrieve, update, and delete stored procedures for a given table instantly.
You can use Trace.WriteLine to output messages to the Debug output window.