T4 Include file path from project root

前端 未结 2 2455
情话喂你
情话喂你 2021-02-20 18:21

How can I include file relatively to project root? Somthing like <# @include file=\"~/Infrastructure/Manager.ttinclude\" #>

2条回答
  •  深忆病人
    2021-02-20 18:57

    You should use $(ProjectDir)

    <#@ include file="$(ProjectDir)\Infrastructure\Manager.ttinclude" #>
    

    You can also use $(SolutionDir) for the Solution root.

提交回复
热议问题