How to disable #line directives being written to the T4 generation output file

前端 未结 2 1749
执笔经年
执笔经年 2021-02-18 21:02

I have encountered a small problem with my T4 code generation.

I have broken my T4 templates up into separate files and placed them in various directories, I have done t

2条回答
  •  生来不讨喜
    2021-02-18 21:19

    Visual Studio 2012 adds the linePragmas="false" template directive:

    <#@ template language="C#" linePragmas="false" #>
    

    http://msdn.microsoft.com/en-us/library/gg586945(v=vs.110).aspx

    Still not sure how to do this in VS2010 which I'm stuck with at work.

提交回复
热议问题