【发布时间】:2011-02-11 02:20:39
【问题描述】:
在 Visual Studio 中使用代码生成模板时,是否可以在“自定义工具”运行时获取 .tt 文件的当前位置?假设我的自定义模板位于
c:\projects\something\template.tt
当它施展魔法时,有没有办法返回上面的路径?
<#=PathOfCurrentTTFile #>
(因此 PathOfCurrentTTFile == c:\projects\something\template.tt)
【问题讨论】:
标签: .net visual-studio templates code-generation t4