I don't use T4 templates often; usually when I do it is editing those of other projects (specifically SubSonic & T4MVC). The experience is always quite unpleasant (and this is certainly why I don't use them more often).
These are the tools I know of, and neither of them quite fit the bill.
Clarius Visual T4.
Tangible T4 Editor
The first time I attempted to use this, I thought Visual Studio 2010 had crashed. Turns out I didn't wait long enough (it took over 2 minutes for the editor window to appear). Call me picky, but this alone puts me off of this tool.
I have a modified T4MVC template that works. After I install Tangible's T4 editor, the template fails with several errors. If I then uninstall Tangible's T4 editor, the template works again. So it would seem something about the editor changes the behavior of T4 in Visual Studio. Perhaps obviously, that's entirely unacceptable.
Are there any other T4 editors I missed? Does anyone else use these tools, encounter these same issues, and successfully work with them?
I should also say, the most important feature for me is simply to distinguish between code that runs as part of the template and code/text that gets output. Everything else is gravy.
T4 Editor Overview. Devart T4 Editor is a powerful Visual Studio add-in for editing T4 templates with syntax highlighting, intellisense, code outlining, and all features of a first-class text editor add-in for Visual Studio. It provides very high performance and makes creating T4 templates easier and faster.
T4 stands for Text template transformation toolkit which is a template-based code generation engine built into Visual Studio. It is available in Visual studio from Visual Studio 2008 and higher version of Visual Studio.
t4 is basically a tool built into VS for doing text transformation, typically for doing code generation. Transform All T4 Templates searches your solution for *. tt files and executes them to create other text, again typically source code, files.
DevArt has released a T4 editor add on for Visual Studio. It is free and it works well. They do not appear to have a version for Visual Studio 2012 yet, however.
I have also come across a ReSharper plugin for editing T4 files, but I have not used it and cannot comment on how well it works (or does not).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With