我正在尝试设置Glass Mapper来生成我的Sitecore项目.我已按照我能找到的所有教程进行操作,但是在尝试生成代码时收到此错误:
I'm trying to setup Glass Mapper to generate my Sitecore items. I've followed every tutorial I could find, but receive this error when attempting to generate the code:
加载包含文件'Helpers.tt'返回的字符串为空或空.转换将不会运行."
"Loading the include file 'Helpers.tt' returned a null or empty string. The transformation will not be run."
一个文件被生成,但是一遍又一遍地重复"ErrorGeneratingOutput"一词.
A file is generated but repeats the word "ErrorGeneratingOutput" over and over.
屏幕截图:
推荐答案
以及Ehab的建议,您可能还必须删除GlassV3Header.tt末尾的空行,否则会出现错误:
As well as what Ehab has suggested, you may also have to remove the empty line at the end of GlassV3Header.tt otherwise you will get a error:
An error occured while generating code for item '/sitecore/templates'. T4 Template: D:\Project\XYZ\TDS.Master\Code Generation Templates\GlassV3Item.tt Errors: Compiling transformation: Invalid token 'this' in class, struct, or interface member declaration Compiling transformation: Method must have a return type Compiling transformation: Type expectedCrytic,但删除多余的行即可解决此问题.
Crytic, but deleting the extra line solves the issue.
更多推荐
Glass Mapper t4空字符串或空字符串
发布评论