pmf pmf -3 years ago 149
C# Question

T4 Templates: How to create a subtemplate?

Is there a way I can create a subtemplate within a template file in T4? I need to reuse a snippet of template within the same template and a embedded function does not allow template based reuse.

Answer Source

You can use include.

<#@ include file="" #>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download