I’m new with t4.
I would like to generate code to cs file.
I created a new tt file.
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ output extension=".cs" #>
class IOperation {
<#
OperationSection section = null;
#>
}
OperationSection is a class in the same assembly.
I assume that I should use the “using” keyword.
How I do it?
Now I receiving an error
Error 2 Compiling transformation: The type or namespace name ‘OperationSection’ could not be found (are you missing a using directive or an assembly reference?)
thanks
Use the
importdirective:Additionally, you might need to add an
assemblydirective to reference the assembly the class is defined in: