Calling function from T4 text templating file

1.2k Views Asked by At

I am using T4 tt file in which i am trying to call a function table ,which is in the different namespace and class say r2ts and sql respectively..

i had imported the namespace and making call like below

<#@ import namespace= "r2ts" #>

<# 
   WriteLine(r2ts.sql.GetTable(schema, tablename));
#>

it is not working it error like below

compilation transformaton: The Type or Namespace name r2ts could not be found (are you missing a using directive or an assembly reference?)

any work around plz.....

1

There are 1 best solutions below

4
On

I think you have to reference the dll and also the assembly directive

<#@ assembly name="Name of the assembly" #>

...check this