StyleCop was just released!

What Gives? Microsofts Code Generation Tool

17. November 2008 19:48 by Scott in   //  Tags: , , , , ,   //   Comments (31)

In a world of Microsoft and third party applications, out comes t4.  t4 is a code generation tool that can compete with CodeSmith, but its FREE and built right into Visual Studio. It has been years since the first edition with very little publication of the actual application. t4 is a free code generation engine from Microsoft that underpins the Domain Specific Languages and Software Factory toolkits.  t4 is a rich code generation and has the ability to stand up against and compete with CodeSmith.  I have used both Codesmith and MyGeneration a lot in the past few years, so I have seen the competition.  What is nice about this old/non publicized tool is that it is built directly into Visual Studio 2008.

t4 is being spear headed into the open source market for free templates by Oleg Sych.  It brings a long a toolbox which can also be download with extra templates along with a GREAT T4 Editor which of course is also free.  There is not more need to spend money on CodeSmith, when Microsoft will do it right out of the box with Visual Studio.

Some have speculated, why hasn't Microsoft published this tool to a greater extent.  We can only think that it has to do with being a Gold Partner.  Microsoft doesn't like to lose Gold Partners and therefore hasn't truly publicized this tool.  The next question you have to ask your self is what can be generated?

  • Site Maps.
  • Database schemas.
  • Session Variables. 
  • Store Procedures.
  • Text Documents.

As of October 2008, t4 Editor has been officially placed as a plug in to Visual Studio 2010, which will boost the ability to generate t4 code through other means besides CodeSmith.

Demos and Other information can be found below.

Point of concern: If your company currently uses CodeSmith, wouldn't it be nice to tell your boss what you found could save the company a few hundred dollars by using something that is already built into Visual Studio? So why not give it a try and save a little money doing it?

kick it on

If you liked this post, please be sure to subscribe to my RSS Feed.