Get Generated Code's File Path in Visual Studio?

Posted by bluevoodoo1 on Stack Overflow See other posts from Stack Overflow or by bluevoodoo1
Published on 2010-04-22T14:01:25Z Indexed on 2010/04/22 14:03 UTC
Read the original article Hit count: 385

When using code generation templates in visual studio, is it possible to get the current location of the .tt file when the 'custom tool' runs? Suppose my custom template lives in

c:\projects\something\template.tt

When it does its magic, is there a way to return the path above?

<#=PathOfCurrentTTFile #>

(so that PathOfCurrentTTFile == c:\projects\something\template.tt)

© Stack Overflow or respective owner

Related posts about .NET

Related posts about code-generation