T4 Editor and GAT

After I uploaded the T4 Editor I had very good feedback but people that was working with GAT (Guidance Automation Toolkit) had not coloring for .t4 extensions. Add .t4 extension to the list was the easier part in order to support .t4 templates.

When you install GAT from here it installs a special host for .t4 templates and a new cool processor "property processor" that define template properties to pass parameters to the template. For example this template receive a property called Number.

<#@ property processor="PropertyProcessor" name="Number" type="System.Int32" #>

Based on this I did the following things:

  • Coloring property as built-in directive (see screenshots)
  • Intellitips for properties (see screenshots)
  • You can set the value for properties using the visual studio property grid
  • You can right click and run the template. It will use the GAT Host if the extension is .t4 and pass the properties.
  • If you need Debug, just set the breakpoint (generally F9) and start debug (F5) !!
  • You can set conditionally breakpoints ;)

The debugger will open the generator source instead of the .t4 file, I could be great if we can tell to the engine what is the name of the file to debug.


Believe me or not I did a Setup this time !!


  1. Visual Studio 2005
  2. If you want to use the .t4 extension and run templates so install GAT

You don't need to install Visual Studio SDK if you want to work only with .t4 templates.







  • Hi,

    Well, I have to admit that I don't understand this yet, but, I have a main question:

    Is that a replacement for Codesmith and such tool ??

    Thank you,

  • Essentially it is the same template technology, there is a extensible template engine generator and I suppose there will be a lot of technology around T4 engine.

    I guess it will be a replacement for any similar template engine technology.

    I forgot this: it is free ;)

  • Hi to all,

    I'm using the t4 editor for templates wrote in DSL Tools designer...

    The syntax completion seems to function, but with this.MyDiagramComponent doesn't work... What am I Failing?

    Is possible to obtain this?

    tnx in advance for the help...

    Paolo Arrigoni

  • Some of my temples lose the keyboard arrow s, backspace and home,end.. keys. When I removed your t4 editor everything worked, but I cant go back to Black and white once I've had Color.

    Any ideas?

    Thanks great addition,


  • Quality piece of work. I like it a lot.

    Having a couple of bits of trouble with it tho.

    Is there any chance on getting a version of this that's compiled against the new version of the GAX/GAT?? Mine fails to run with the Feb 2007 CTP versions. I needed it for something, can't quite remember now, and T4 Template can't find version 8.0 (CTP is 8.1)

    It doesn't seem to pick up other libraries that are included, so I can't get the intellisense on them (id System.Data).

    Thanks for a wonderful tool tho.


  • Hi, the link to the setup file is dead. :(

  • Does it work for vs2008?

Comments have been disabled for this content.