Search Wiki:
Resource Page Description
This sample shows different approaches to generating code using the Text Templating engine that ships in the VS SDK.

In order to build the sample, you will need Visual Studio 2008 and the Visual Studio 2008 SDK (although you could adapt the sample to work in VS2005).

The sample contains a "TT ReadMe.txt" file that explains its use.

It compares three different approaches:
  • an unstructured approach, where all of the template code is in a single file;
  • a more structured approach using include files; and
  • a third approach that moves some of the code out of the text templates into a separate assembly, and also creates an additional object model to simplify code generation.
Last edited Jun 30 2008 at 5:11 PM  by vsxcg, version 3
Bruk wrote  Jul 7 2008 at 4:34 AM  
Text Templating also goes by the name of T4. Just adding this comment about T4 because I noticed this sample is not shown in the Code Gallery search results when searching for T4. (I wonder if there are other T4-related sentences I could add to this comment so that T4 searches would return this page. :) )

Nice sample. Thank you for adding it.

DuncanP wrote  Jul 28 2008 at 4:12 PM  
Thanks Bruk. I've added T4 as a tag for this sample.

Tim_Fischer wrote  Apr 30 2009 at 8:59 PM  
Here are some sample Videos

gcapnias wrote  May 24 2009 at 7:30 AM  
Why despite the use of T4 all around VS2010 technologies, still there is no integrated T4 Editor in VS2010, still there are no plans implementing one, and one has to rely on Clarius or Tangible in order to get a T4 Editor?

Page view tracker