currentEntity doesn't exists, like the error says.
add this to your lpt file
<~
public EntityDefinition currentEntity{
get{
EntityDefinition e = _activeObject as EntityDefinition;
return e;
}
}
~>
To get (at least some) understanding of where these fields come from (_activeObject, __executingGenerator etc) download the source code package for lbll 2.0 and open the CodeGenerator solution. In the LptParser project open DotNetTemplateEngine.cs and scroll/jump to the ProduceCSCode method.
I've modified my copy of lptparser so the generated class inherits from a base class I created (rather than just implement the interface) as to provide common functionality (like CurrentEntity) to all my templates. (a sweeter alternative to 'including' templates)
The objects you have are: (and this is no doubt in a help file somewhere)
StreamWriter __outputWriter
IGenerator _executingGenerator
Dictionary<string, TaskParameter> _parameters
object _activeObject
Hack the planet!