我用CodeSmith自带的模板,按下生成按钮 只见进度条闪了下 就是看不见生成的代码,郁闷,为什么会没有代码预览区啊 我的CodeSmith版本是3.0 后来3.1也试过了 一样的

解决方案 »

  1.   

    我解决了,特来告诉你一下
    模板文件一定要这样才能创建成功
    <%@ CodeTemplate Language="C#" TargetLanguage="C#"
          Description="Generates a class including a special informational header" %>
     
    <%@ Property Name="NameSpace" Type="String"
          Category="Context"
          Description="The namespace to use for this class" %>
     
    <%@ Property Name="ClassName" Type="String"
          Category="Context"
          Description="The name of the class to generate" %>
     
    <%@ Property Name="DevelopersName" Type="String"
          Category="Context"
          Description="The name to include in the comment header" %>


    using System;
    namespace <%=NameSpace %>
    {
          /// <summary>
          /// Summary description for <%=ClassName %>.
          /// </summary>
          public class <%=ClassName %>
          {
                public <%=ClassName %>()
               {
                }
          }
    }