Try putting the second block inside <#+ #>
(notice +
)
Helper methods in TT generators
-
30-09-2022 - |
Question
I am trying to put a helper method inside my T4 generator to make some of the generation logic a bit simpler, but I cant get it to compile correctly. I want to use this helper later in the .tt (not have it generated as output)
If I put the following
<#
public static void Test()
{
}
#>
or
<#
public static class Helpers
{
public static void Test()
{
}
}
#>
In my .tt i get the following error
Compiling transform: } expected
Is there a way to do this?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow