T4模板调试方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/allenwdj/article/details/51142838

T4 模板的调试方法,方便遇到问题快速定位和优化 :
1. .ttinclude文件的第一行修改为

<#@ template language="C#" debug="true" hostspecific="True" #>


2. 在需要调试的代码片断附近加入:

System.Diagnostics.Debugger.Launch();


猜你喜欢

转载自blog.csdn.net/allenwdj/article/details/51142838
T4
今日推荐