Glass Mapper t4空字符串或空字符串

编程入门 行业动态 更新时间:2024-10-26 12:29:38
本文介绍了Glass Mapper t4空字符串或空字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试设置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 expected

Crytic,但删除多余的行即可解决此问题.

Crytic, but deleting the extra line solves the issue.

更多推荐

Glass Mapper t4空字符串或空字符串

本文发布于:2023-10-08 13:56:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1472830.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:空字符串   Glass   Mapper

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!