The error when compiling in template studio is -
Compile Error (3, 10) CS1002 :; exepected
Here is the first few lines of cs code given back when compiling the template in template studio the entire piece is too long -
using SD.LLBLGen.Pro.ApplicationCore.StoredProcedures;
using RootNamespace;
using If IsSubType;
using SD.LLBLGen.Pro.ApplicationCore.Templates;
using System.Collections;
using EndIf;
using NextForeach;
using SD.LLBLGen.Pro.ApplicationCore.Entities;
using EntityFieldName;
using System;
using If UsePartialClasses;
using SD.LLBLGen.Pro.ApplicationCore.Tasks;
using SD.LLBLGen.Pro.LptParser;
using System.IO;
using CurrentEntityName;
using SD.LLBLGen.Pro.ApplicationCore.TypedLists;
using SD.LLBLGen.Pro.DBDriverCore;
using System.Text;
using SD.LLBLGen.Pro.ApplicationCore.TypedViews;
using SD.LLBLGen.Pro.ApplicationCore;
using SD.LLBLGen.Pro.GeneratorCore;
using CaseCamel EntityFieldName;
using TypeOfField;
using Else;
using System.Collections.Generic;
using If EntityFieldOverrides;
using SuperTypeName;
using Foreach EntityField CrLf;
using System.ComponentModel;
public class ManagerBaseTemplate : ITemplateClass {
private StreamWriter __outputWriter;
private IGenerator _executingGenerator;
private Dictionary<string, TaskParameter> _parameters;
private object _activeObject;
TEMPLATE - DTOTemplate.lpt
<[ System.IO ]>
<[ System.Text ]>
<[ SD.LLBLGen.Pro.LptParser ]>
<[ SD.LLBLGen.Pro.ApplicationCore ]>
<[ SD.LLBLGen.Pro.ApplicationCore.Entities ]>
using System;
using System.ComponentModel;
using System.Collections;
using System.Runtime.Serialization;
using <[RootNamespace]>.EntityClasses;
namespace <[RootNamespace]>.DTOClasses
{
/// <summary>
/// DTO class for the entity '<[CurrentEntityName]>'.
/// </summary>
[Serializable]
public <[If UsePartialClasses]>partial <[EndIf]>class <[CurrentEntityName]>DTO : <[ If IsSubType ]><[ SuperTypeName ]>DTO<[ EndIf]>
{
#region Class Member Declarations
<[Foreach EntityField CrLf]> private <[TypeOfField]> _<[CaseCamel EntityFieldName]>;<[NextForeach]>
#endregion
/// <summary>
/// CTor
/// </summary>
public <[CurrentEntityName]>DTO()
{
}
/// <summary>
/// CTor which initializes the DTO with values from its corresponding entity
/// </summary>
/// <param name="entityInstance">The entity instance which holds the values for this DTO</param>
public <[CurrentEntityName]>DTO(<[CurrentEntityName]>Entity entityInstance)<[ If IsSubType ]> : base(entityInstance)<[ EndIf]>
{
<[Foreach EntityField CrLf]> _<[CaseCamel EntityFieldName]> = entityInstance.<[EntityFieldName]>;<[NextForeach]>
}
/// <summary>
/// Creates a new entity instance and copies over the values of this DTO
/// </summary>
public <[CurrentEntityName]>Entity ToEntity()
{
return ToEntity(new <[CurrentEntityName]>Entity());
}
/// <summary>
/// Copies over the values of this DTO into the entity passed in.
/// </summary>
public <[CurrentEntityName]>Entity ToEntity(<[CurrentEntityName]> toFill)
{
<[Foreach EntityField CrLf]> toFill.<[EntityFieldName]> = _<[CaseCamel EntityFieldName]>;<[NextForeach]>
<[ If IsSubType ]> base.ToEntity(toFill);<[ EndIf]>
return toFill;
}
<[Foreach EntityField CrLf]>
/// <summary> The <[EntityFieldName]> property of the Entity <[CurrentEntityName]></summary>
public <[If EntityFieldOverrides]>override<[Else]>virtual<[EndIf]> <[TypeOfField]> <[EntityFieldName]>
{
get { return _<[CaseCamel EntityFieldName]>;}
set { _<[CaseCamel EntityFieldName]> = value; }
}<[NextForeach]>
}
}
TEMPLATEBINDINGS FILE - DTO.Template.templatebindings
<?xml version="1.0" encoding="utf-8"?>
<templateBindings name="Manager Template" description="Manager templates" precedenceLevel="10" databaseDriverID="2D18D138-1DD2-467E-86CC-4838250611AE" xmlns="http://sd/llblgen/pro/templateBindingsDefinition.xsd">
<supportedPlatforms>
<platform name=".NET 2.0" />
</supportedPlatforms>
<language name="C#">
<templateBinding templateID="SD_DTOTemplate" filename="DTO\DTOTemplate.lpt" templateLanguage="C#" />
</language>
</templateBindings>
Task file - DTO.Template.tasks
<?xml version="1.0"?>
<taskGroup xmlns="http://sd/llblgen/pro/taskGroupElementDefinitions.xsd"
name="DTO Templates" isOptional ="false"
description="General group of tasks which are used DTO templates.">
<supportedPlatforms>
<platform name=".NET 2.0" />
</supportedPlatforms>
<supportedTemplateGroups>
<templateGroup name="Adapter" />
</supportedTemplateGroups>
<taskGroup name="Create Directories">
<task name="DTODirectoryCreator" assemblyFilename="SD.LLBLGen.Pro.TaskPerformers.dll" taskPerformerClass="SD.LLBLGen.Pro.TaskPerformers.DirectoryCreator">
<parameters>
<parameter name="folderToCreate" defaultValue="DTO" isOptional="false" description="The folder to create"/>
<parameter name="failWhenExistent" defaultValue="false" isOptional="true" description="Flag to signal what to do when the folder already exists. Overrules clearWhenExistent" valueType="boolean"/>
<parameter name="clearWhenExistent" defaultValue="false" isOptional="true" description="Flag to signal if an existing folder has to be cleared first. Overruled by failWhenExistent" valueType="boolean"/>
</parameters>
</task>
</taskGroup>
<taskGroup name="Create DTO Classes" description="Create DTO Classes">
<task name="DTOClassCreator" assemblyFilename="SD.LLBLGen.Pro.LptParser.dll" taskPerformerClass="SD.LLBLGen.Pro.LptParser.DotNetTemplateEngine">
<parameters>
<parameter isOptional="false" name="destinationFolder" defaultValue="DTO"/>
<parameter isOptional="false" name="failWhenExistent" defaultValue="false"/>
<parameter isOptional="false" name="filenameFormat" defaultValue="[elementName]DTO.[extension]"/>
<parameter isOptional="false" name="templateID" defaultValue="SD_DTOTemplate"/>
<parameter isOptional="false" name="emitType" defaultValue="allEntities"/>
</parameters>
</task>
</taskGroup>
</taskGroup>
I'm using the latest download of template studio and llblgen (December 6th 2006 build) and the latest version of the manager templates unaltered. Thanks.