Question

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.

Was it helpful?

Solution

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

OTHER TIPS

Check out the T4 Toolbox.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top