Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What T4 editing tools exist?

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.

  1. Clarius Visual T4.

    • Does not support Visual Studio 2010. Their blog mentions work ongoing, but that was 2 months ago with no updates since. Their support forum is filled with spam and questions about when VS2010 will be supported.
      Most of the projects I work on are in Visual Studio 2010, and the templates I deal with require themselves to be run in the Visual Studio host (as they access project information through VS's automation object model). This is why I am looking for a VS2010 compatible editor.
  2. 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.

like image 747
quentin-starin Avatar asked Oct 22 '10 20:10

quentin-starin


People also ask

What is T4 Editor?

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.

What is T4 in Entity Framework?

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.

What is transform all T4 templates?

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.


1 Answers

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).

like image 123
quentin-starin Avatar answered Oct 28 '22 09:10

quentin-starin