Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

CodeSmith Generator allows you to build, run, and compile your templates.

Building Templates

To compile the current template, select Build from the Tools menu, or press Ctrl+Shift+B, or click the Build button on the toolbar. The Output window will show the results of the build operation.

Running Templates

To run the current template, select Run from the Tools menu, or press F5, or click the Run button on the toolbar. This will execute the current template, using values from the Properties window together with the template to create the generated code. At the end of the Run operation, CodeSmith Generator will display the generated code in the Output tab.

Compiling Templates

To compile a template, select Compile To Assembly from the Tools menu. This will open the Compile to Assembly dialog box:

Fill in an assembly name, namespace name, and type name, and click OK to create the assembly. CodeSmith will output a .dll which you can then reference from any .NET project. You will then be able to create an instance of your compiled template by using the type name that you specified. You can then set the properties on the template via code and call the Render or RenderToFile methods to execute the template.

This feature is only available in the Professional Edition of CodeSmith.

  • No labels