t4 "using" keyword

c#, c#-4.0, t4

Solution

Use the `import` directive:

<#@ import namespace="YourNamespace" #>

Additionally, you might need to add an `assembly` directive to reference the assembly the class is defined in:

<#@ assembly name="$(SolutionDir)\MyProject\bin\Debug\SomeLibrary.Dll" #>

Problem

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

Original source