« Software development security check list | XPath expressions quick reference: »
Do You Know About T4 (Text Template Transformation Toolkit) Code Generation In Visual Studio? by Vahid 14. April 2009 03:15
Working with Microsoft products always has some surprises, now be it a defect, missing functionality or an unknown cool new feature. What’s the story? Well recently i was listening to a DotNetRocks show in which i heard the word “T4” which is something regarding to code generation in Visual Studio 2008! i was like, what is this? How come that i have not heard it before? Anyway I was really surprised. So as a code generation passionate i did some R&D about it and here is the outcome. What is T4? T4**is a code generator built right into Visual Studio. To be clear, we HAVE THIS NOW on our system.**So now is the right time to introduce code generation to our company. this means If we are doing something twice or more, manually, in our project, we should stop it and generate it instead. However, there is an issue with this technology and that’s the fact that Microsoft does not support it completely as of now and this reason why it is kind of hidden in VS. There’s no item templates in File | New Item and there’s no intellisense or syntax highlighting. However you don’t need this, but if you want really get the most out of T4, first, have a look at “T4 Editor Community Edition.” That’ll get you some basic coloring.
...