开发者

Why can't I get T4 templates to generate?

开发者 https://www.devze.com 2023-02-22 10:09 出处:网络
I am trying to create a T4 template, but I am stuck at the very first stages.I can\'t get any output to be generated.Right now I have the most basic template

I am trying to create a T4 template, but I am stuck at the very first stages. I can't get any output to be generated. Right now I have the most basic template

<#@ template language="C#" #>
<开发者_开发问答;#@ output extension="cs" #>
Testing

When I save this file, nothing is generated. I then tried to right click on the .tt file, and the context menu doesn't show a "Run Custom Tool" menu item, as it does when I right click T4MVC's .tt file.

What do I do to get output to be generated?


Aha, figured it out. I had to click on my .tt file, open the properties, and set the CustomTool property to TextTemplatingFileGenerator.

0

精彩评论

暂无评论...
验证码 换一张
取 消