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 Current »

To include comments in a template, surround them with <%-- and --%> markers. Comments may span multiple lines. For instance, this comment will have no effect on the template's output:

<%--
Name: TestHarness.cst
Description: Generates a standard test harness for an object
--%>

Inside of a script block, use the commenting syntax of the template's language. For instance, if your template is written in C#, comments in script blocks should be prefaced with // or /* commented */.

To include a comment in a template's output, treat it like any other string. The comment in this template fragment will be copied directly to the generated code:

<%@ CodeTemplate Language="VB" TargetLanguage="VB">
' This class generated by CodeSmith Generator

  • No labels