how to get the physical path to the output file at template transform-time

Aug 7, 2009 at 6:20 PM
Edited Aug 7, 2009 at 7:05 PM

All --

I need to know how to get the physical path to the output file at template transform-time.

How can that be done?

Please advise.

Thank you.

-- Mark Kamoski

Coordinator
Aug 11, 2009 at 9:35 PM
<#@ template hostspecific="True" #>
<#
    this.WriteLine(Host.TemplateFile);
#>
or, if you need to get it from a nested Template or Generator class:
<#@ template hostspecific="True" #>
<#@ include file="T4Toolbox.tt" #>
<#
    this.WriteLine(TransformationContext.Host.TemplateFile);
#>