codesmith提示The 'xxxx.cst' template property 'xxxx' is required

  今天在用codesmith将数据库表生成对应的C#类模型cs代码,执行Generate后提示The "Entity.cst"template property 'Table' is required错误。

codesmith提示The "xxxx.cst"template property 'xxxx' is required

 

  出现这个错误是因为模板文件cst里面定义了某个属性值,如上面截图所示的Table属性。

<%@ Property Name="Table" Type="TableSchema" %>

  这个Table属性还没有通过IDE编辑器右边的Properies窗口赋值造成的,定义的property属性,不能在标记里面添加value之类的属性进行赋值,必须要要通过IDE右边的Properties窗口进行赋值才行,如下图所示。

codesmith提示The "xxxx.cst"template property 'xxxx' is required

  codesmith确实是好东西,一下就可以将数据库里面的表生成了C#的类模型代码,爽。。。。

加支付宝好友偷能量挖...


原创文章,转载请注明出处:codesmith提示The 'xxxx.cst' template property 'xxxx' is required

评论(0)Web开发网
阅读(507)喜欢(0)Asp.Net/C#/WCF