Hello
I am using llblgen 3 on a demo licence
Following a recomendation on an earlier thread I have created a very simple .lpt template. I have added this in by creating a templatebinding and adding a SD.Tasks.Base.ConsumeLptTemplate task to the run queue.
when I start the generator I get a null reference exception when It hits my template. The details (which I've pasted below) give me no indication as to the problem.
Is there a way to debug templates? Any idea what is happening in this case?
Thanks
~Brett
My Template:
<%
EntityDefinition entity = (EntityDefinition)_activeObject;
%>
using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.ComponentModel;
namespace <%=_executingGenerator.RootNamespaceToUse%>.DTOClasses
{
/// <summary>Class which represents the entity </summary>
public partial class <%=entity.Name%>
{
public string myname;
}
}
Details of exception:
-----[Core exception]--------------------
at test_dto.__ScriptCode()
at SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine.CallTemplateEmitter[TElement](Assembly compiledTemplatesAssembly, String templateID, Dictionary2 parameters, StreamWriter outputWriter, TElement currentElement)
at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutputToFile[TElement](TElement currentElement, String destinationFilename, Boolean failWhenExistent, Assembly compiledTemplatesAssembly, String templateID, Dictionary
2 parameters, Boolean isPartOfSet, String outputDescription)
at SD.LLBLGen.Pro.GeneratorCore.CodeGenerationEngineBase.EmitOutput(Dictionary2 parameters, String fullPath, String templateID, Assembly compiledTemplatesAssembly, EmitType emitTypeToPerform, String filenameFormat, Boolean failWhenExistent)
at SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine.Perform(IGenerator executingGenerator, ITask taskDefinition, Dictionary
2 parameters)
at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.Task.PerformElement(IGenerator executingGenerator, LogNode parentNode)
at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode)
at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroup.PerformElement(IGenerator executingGenerator, LogNode parentNode)
at SD.LLBLGen.Pro.ApplicationCore.CodeGenerationMetaData.Tasks.TaskGroupElement.Perform(IGenerator executingGenerator, LogNode parentNode)
at SD.LLBLGen.Pro.GeneratorCore.Generator.RunTasks(String rootNameSpaceToUse, String destinationRootFolder, String groupName)
at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, ApplicationConfiguration configurationSettings, Language languageToUse, Platform platformToUse, List1 templateBindingsToUse, String templateGroupToUse, String rootNameSpaceToUse, String destinationRootFolder, Project projectDefinition, CodeGenerationCycleOutputType outputType)
at SD.LLBLGen.Pro.GeneratorCore.Generator.Start(ITaskGroup tasksToExecute, CodeGenerationCyclePreferences preferences, ApplicationConfiguration configurationSettings, Project projectDefinition)
at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformRunCodeGenerationCycleAction(ITaskGroup toExecute, CodeGenerationCyclePreferences codeGenerationCyclePreferences, HashSet
1 entitiesToUse, HashSet1 spCallsToUse, HashSet
1 typedViewsToUse, HashSet1 typedListsToUse, HashSet
1 valueTypesToUse, LogNode& tasksResultLog)