How can I get intellisense in a T4 template?

When testing these tutorials ( T4 Tutorial: Creating Reusable Generation Templates ) I noticed that although I used simple C #, I did not get any intellisense, possibly due to the file extension (.tt)

Shouldn't Visual Studio treat .tt files as .cs files and therefore get the right intellisense hint?

+43
visual-studio-2008 visual-studio t4 intellisense
Jan 07 '09 at 15:39
source share
6 answers

You can purchase the professional version of T4 Editor. It works very well in standalone .tt files, but, unfortunately, due to differences in how the professional version of T4 Editor and T4 compile templates, you will receive false error messages for this tutorial, which relies on the T4 Toolbox .

+3
Jan 08 '09 at 11:47
source share

Resharper can do this with the ForTea plugin, which adds support for editing T4 files (.tt).

+36
Aug 10 '13 at 6:17
source share

http://visualstudiogallery.msdn.microsoft.com/en-us/60297607-5fd4-4da4-97e1-3715e90c1a23

Here you use the plugin ...

Vaseem

EDIT

Also available for Visual Studio 2012: Tangible T4 Editor 2.3.0
Also available for Visual Studio 2015: Tangible T4 Editor 2.3.0
Also available for Visual Studio 2017: Tangible T4 Editor 2.4.0

+32
Aug 18 '10 at 5:08
source share

You can simply download the T4 material editor at t4editor.tangible-engineering.com, it has Intelli-Sense for the most important namespaces, also in the free edition.

+9
Mar 23 '09 at 19:13
source share

You can try the Devart T4 Editor . It is free and provides syntax highlighting, intellisense, and support code.

+4
Jun 08 2018-11-11T00:
source share

As Scott Hanselman also points out , the intellisense that you expect from some of the videos and articles on T4 is not built into VS2008, you need Clarius's T4 editor, but they have a community version with some minimalist features to get you started.

+1
Mar 24 '09 at 10:13
source share



All Articles