Top "T4" questions

T4 stands for Text Template Transformation Toolkit and is Microsoft's template based text generation framework included with Visual Studio.

Adding [DataMember] [DataContract] attributes in Entity Framework POCO Template

I would like some help adding in a POCO .tt Entity Framework template Attributes to support WCF serialization and if …

wcf c#-4.0 entity-framework-4 poco t4
T4 - TT - Using custom classes in TT files

I would like to use my own class define in a CS file in my TT. Example: public class ClassDefinition { …

c# t4 css texttemplate
T4 Get Current Working Directory of Solution

I am using T4 in Visual Studio 2010, and I want to iterate over the files in my solution, however I …

c# visual-studio code-generation t4
T4 template will not transform with build

I'm using VisualStudio Ultimate 2012 (Update 1) on Windows 7. I can get my T4 template to generate a file by: right click […

c# visual-studio-2012 t4 tangible-t4-editor
How do I pass a string parameter to a t4 template

Hi I am trying to find a way to pass a normal string as a parameter to a text template. …

c# string parameters t4 texttemplate
Get Project or Relative Directory with T4

How can I get a reference to the directory of the visual studio project or solution or the directory of …

visual-studio visual-studio-2008 file-io code-generation t4
Comments in T4 Templates

This seems like such a basic question, but I haven't been able to find an MSDN article or StackOverflow question …

comments t4
Creating T4 templates at runtime (build-time)?

We are building an inhouse application which needs to generate HTML files for upload into eBay listings. We are looking …

c# .net templates code-generation t4
How to use T4 to generate two files at the same time from one template?

I am having a case in which I need to generate two CSharp code files with pretty the same code …

c# .net code-generation t4 webservice-client
T4 templates error: loading the include file ef.utility.cs.ttinclude returned a null or empty string

I have overridden the controller generation T4 templates (ControllerWithContext.tt) as described here. I would like to take advantage of …

c# visual-studio-2010 t4